Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

refactor(injector): remove unneeded JSHint directives #13922

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(injector): remove unneeded JSHint directives
  • Loading branch information
thorn0 committed Feb 2, 2016
commit acf16883ec185a28818acc3504f08746f19449fd
8 changes: 2 additions & 6 deletions src/auto/injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))();
}
}

Expand All @@ -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))();
}


Expand Down