We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b90efc8 commit a7be710Copy full SHA for a7be710
test/unit/angular_spec.js
@@ -2,6 +2,24 @@
2
3
/* eslint-env mocha, jasmine */
4
5
+if (typeof Function.prototype.bind != 'function') {
6
+ Function.prototype.bind = function bind(obj) {
7
+ var args = Array.prototype.slice.call(arguments, 1),
8
+ self = this,
9
+ nop = function() {
10
+ },
11
+ bound = function() {
12
+ return self.apply(
13
+ this instanceof nop ? this : (obj || {}), args.concat(
14
+ Array.prototype.slice.call(arguments)
15
+ )
16
+ );
17
+ };
18
+ nop.prototype = this.prototype || {};
19
+ bound.prototype = new nop();
20
+ return bound;
21
22
+}
23
24
describe('autocomplete directive', function() {
25
global.jQuery = require('jquery');
0 commit comments