Skip to content

Commit b936236

Browse files
committed
refactor(): simplify nodeLinkFn
1 parent fc115bf commit b936236

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ng/compile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -706,12 +706,12 @@ function $CompileProvider($provide) {
706706
}
707707
$element = attrs.$$element;
708708

709-
if (newScopeDirective && isObject(newScopeDirective.scope)) {
709+
if (newIsolatedScopeDirective) {
710710
var LOCAL_REGEXP = /^\s*([@=&])\s*(\w*)\s*$/;
711711

712712
var parentScope = scope.$parent || scope;
713713

714-
forEach(newScopeDirective.scope, function(definiton, scopeName) {
714+
forEach(newIsolatedScopeDirective.scope, function(definiton, scopeName) {
715715
var match = definiton.match(LOCAL_REGEXP) || [],
716716
attrName = match[2]|| scopeName,
717717
mode = match[1], // @, =, or &
@@ -734,7 +734,7 @@ function $CompileProvider($provide) {
734734
// reset the change, or we will throw this exception on every $digest
735735
lastValue = scope[scopeName] = parentGet(parentScope);
736736
throw Error(NON_ASSIGNABLE_MODEL_EXPRESSION + attrs[attrName] +
737-
' (directive: ' + newScopeDirective.name + ')');
737+
' (directive: ' + newIsolatedScopeDirective.name + ')');
738738
};
739739
lastValue = scope[scopeName] = parentGet(parentScope);
740740
scope.$watch(function parentValueWatch() {
@@ -765,7 +765,7 @@ function $CompileProvider($provide) {
765765

766766
default: {
767767
throw Error('Invalid isolate scope definition for directive ' +
768-
newScopeDirective.name + ': ' + definiton);
768+
newIsolatedScopeDirective.name + ': ' + definiton);
769769
}
770770
}
771771
});

0 commit comments

Comments
 (0)