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

Commit 0ecf109

Browse files
committed
refactor($compile): remove unnecessary try/catch
1 parent cfc8b41 commit 0ecf109

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/ng/compile.js

+14-16
Original file line numberDiff line numberDiff line change
@@ -2691,24 +2691,22 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
26912691
if (hasDirectives.hasOwnProperty(name)) {
26922692
for (var directive, directives = $injector.get(name + Suffix),
26932693
i = 0, ii = directives.length; i < ii; i++) {
2694-
try {
2695-
directive = directives[i];
2696-
if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
2697-
directive.restrict.indexOf(location) !== -1) {
2698-
if (startAttrName) {
2699-
directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
2700-
}
2701-
if (!directive.$$bindings) {
2702-
var bindings = directive.$$bindings =
2703-
parseDirectiveBindings(directive, directive.name);
2704-
if (isObject(bindings.isolateScope)) {
2705-
directive.$$isolateBindings = bindings.isolateScope;
2706-
}
2694+
directive = directives[i];
2695+
if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
2696+
directive.restrict.indexOf(location) !== -1) {
2697+
if (startAttrName) {
2698+
directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
2699+
}
2700+
if (!directive.$$bindings) {
2701+
var bindings = directive.$$bindings =
2702+
parseDirectiveBindings(directive, directive.name);
2703+
if (isObject(bindings.isolateScope)) {
2704+
directive.$$isolateBindings = bindings.isolateScope;
27072705
}
2708-
tDirectives.push(directive);
2709-
match = directive;
27102706
}
2711-
} catch (e) { $exceptionHandler(e); }
2707+
tDirectives.push(directive);
2708+
match = directive;
2709+
}
27122710
}
27132711
}
27142712
return match;

0 commit comments

Comments
 (0)