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

Commit 2ed4849

Browse files
committed
refactor($compile): remove unnecessary try/catch
1 parent 761c70c commit 2ed4849

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
@@ -2652,24 +2652,22 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
26522652
if (hasDirectives.hasOwnProperty(name)) {
26532653
for (var directive, directives = $injector.get(name + Suffix),
26542654
i = 0, ii = directives.length; i < ii; i++) {
2655-
try {
2656-
directive = directives[i];
2657-
if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
2658-
directive.restrict.indexOf(location) !== -1) {
2659-
if (startAttrName) {
2660-
directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
2661-
}
2662-
if (!directive.$$bindings) {
2663-
var bindings = directive.$$bindings =
2664-
parseDirectiveBindings(directive, directive.name);
2665-
if (isObject(bindings.isolateScope)) {
2666-
directive.$$isolateBindings = bindings.isolateScope;
2667-
}
2655+
directive = directives[i];
2656+
if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
2657+
directive.restrict.indexOf(location) !== -1) {
2658+
if (startAttrName) {
2659+
directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
2660+
}
2661+
if (!directive.$$bindings) {
2662+
var bindings = directive.$$bindings =
2663+
parseDirectiveBindings(directive, directive.name);
2664+
if (isObject(bindings.isolateScope)) {
2665+
directive.$$isolateBindings = bindings.isolateScope;
26682666
}
2669-
tDirectives.push(directive);
2670-
match = directive;
26712667
}
2672-
} catch (e) { $exceptionHandler(e); }
2668+
tDirectives.push(directive);
2669+
match = directive;
2670+
}
26732671
}
26742672
}
26752673
return match;

0 commit comments

Comments
 (0)