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

Commit 43f7206

Browse files
thorn0gkalpak
authored andcommitted
refactor(injector): remove unneeded JSHint directives
Closes #13922
1 parent a909ed1 commit 43f7206

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/auto/injector.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -861,9 +861,7 @@ function createInjector(modulesToLoad, strictDi) {
861861
return fn.apply(self, args);
862862
} else {
863863
args.unshift(null);
864-
/*jshint -W058 */ // Applying a constructor without immediate parentheses is the point here.
865-
return new (Function.prototype.bind.apply(fn, args));
866-
/*jshint +W058 */
864+
return new (Function.prototype.bind.apply(fn, args))();
867865
}
868866
}
869867

@@ -875,9 +873,7 @@ function createInjector(modulesToLoad, strictDi) {
875873
var args = injectionArgs(Type, locals, serviceName);
876874
// Empty object at position 0 is ignored for invocation with `new`, but required.
877875
args.unshift(null);
878-
/*jshint -W058 */ // Applying a constructor without immediate parentheses is the point here.
879-
return new (Function.prototype.bind.apply(ctor, args));
880-
/*jshint +W058 */
876+
return new (Function.prototype.bind.apply(ctor, args))();
881877
}
882878

883879

0 commit comments

Comments
 (0)