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

Commit ed6af3e

Browse files
committed
refactor($compile): remove unnecessary try/catch
1 parent 9cf6b19 commit ed6af3e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/ng/compile.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -2242,17 +2242,15 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
22422242
if (hasDirectives.hasOwnProperty(name)) {
22432243
for (var directive, directives = $injector.get(name + Suffix),
22442244
i = 0, ii = directives.length; i < ii; i++) {
2245-
try {
2246-
directive = directives[i];
2247-
if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
2248-
directive.restrict.indexOf(location) != -1) {
2249-
if (startAttrName) {
2250-
directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
2251-
}
2252-
tDirectives.push(directive);
2253-
match = directive;
2245+
directive = directives[i];
2246+
if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
2247+
directive.restrict.indexOf(location) != -1) {
2248+
if (startAttrName) {
2249+
directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
22542250
}
2255-
} catch (e) { $exceptionHandler(e); }
2251+
tDirectives.push(directive);
2252+
match = directive;
2253+
}
22562254
}
22572255
}
22582256
return match;

0 commit comments

Comments
 (0)