diff --git a/src/auto/injector.js b/src/auto/injector.js index 25781aa91b02..7bcb42532df6 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -861,9 +861,7 @@ function createInjector(modulesToLoad, strictDi) { return fn.apply(self, args); } else { args.unshift(null); - /*jshint -W058 */ // Applying a constructor without immediate parentheses is the point here. - return new (Function.prototype.bind.apply(fn, args)); - /*jshint +W058 */ + return new (Function.prototype.bind.apply(fn, args))(); } } @@ -875,9 +873,7 @@ function createInjector(modulesToLoad, strictDi) { var args = injectionArgs(Type, locals, serviceName); // Empty object at position 0 is ignored for invocation with `new`, but required. args.unshift(null); - /*jshint -W058 */ // Applying a constructor without immediate parentheses is the point here. - return new (Function.prototype.bind.apply(ctor, args)); - /*jshint +W058 */ + return new (Function.prototype.bind.apply(ctor, args))(); }