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

Commit a021a37

Browse files
committed
style($compile): Style fixes
1 parent a7d69c9 commit a021a37

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
@@ -944,7 +944,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
944944
* {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
945945
* @returns {ng.$compileProvider} Self for chaining.
946946
*/
947-
this.directive = function registerDirective(name, directiveFactory) {
947+
this.directive = function registerDirective(name, directiveFactory) {
948948
assertNotHasOwnProperty(name, 'directive');
949949
if (isString(name)) {
950950
assertValidDirectiveName(name);
@@ -1913,23 +1913,21 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
19131913
* @returns {Function}
19141914
*/
19151915
function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
1916-
if (eager) {
1917-
return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
1918-
}
1919-
1920-
var compiled;
1916+
var compiled;
19211917

1922-
return function() {
1923-
if (!compiled) {
1924-
compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
1925-
1926-
// Null out all of these references in order to make them eligible for garbage collection
1927-
// since this is a potentially long lived closure
1928-
$compileNodes = transcludeFn = previousCompileContext = null;
1929-
}
1918+
if (eager) {
1919+
return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
1920+
}
1921+
return function() {
1922+
if (!compiled) {
1923+
compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
19301924

1931-
return compiled.apply(this, arguments);
1932-
};
1925+
// Null out all of these references in order to make them eligible for garbage collection
1926+
// since this is a potentially long lived closure
1927+
$compileNodes = transcludeFn = previousCompileContext = null;
1928+
}
1929+
return compiled.apply(this, arguments);
1930+
};
19331931
}
19341932

19351933
/**

0 commit comments

Comments
 (0)