diff --git a/src/javascripts/ng-admin/es6/lib/View/ListView.js b/src/javascripts/ng-admin/es6/lib/View/ListView.js index 0a88e8f0..1046c5d6 100644 --- a/src/javascripts/ng-admin/es6/lib/View/ListView.js +++ b/src/javascripts/ng-admin/es6/lib/View/ListView.js @@ -14,7 +14,7 @@ class ListView extends View { this._sortDir = 'DESC'; } - perPage(perPage) { + perPage() { if (!arguments.length) return this._perPage; this._perPage = arguments[0]; return this; diff --git a/src/javascripts/test/function.bind.shim.js b/src/javascripts/test/function.bind.shim.js new file mode 100644 index 00000000..5bd204f2 --- /dev/null +++ b/src/javascripts/test/function.bind.shim.js @@ -0,0 +1,7 @@ +// PhantomJS doesn't support bind yet +Function.prototype.bind = Function.prototype.bind || function (thisp) { + var fn = this; + return function () { + return fn.apply(thisp, arguments); + }; +}; diff --git a/src/javascripts/test/karma.conf.js b/src/javascripts/test/karma.conf.js index eb7929c9..adbbe27e 100644 --- a/src/javascripts/test/karma.conf.js +++ b/src/javascripts/test/karma.conf.js @@ -30,6 +30,7 @@ module.exports = function (config) { {pattern: 'ng-admin/lib/polyfill/bind.js', included: true}, // Test files + {pattern: 'test/function.bind.shim.js', included: true}, {pattern: 'test/mock/*.js', included: false}, {pattern: 'test/unit/**/**/*.js', included: false},