aboutsummaryrefslogtreecommitdiffstats
path: root/src/Compiler.js
diff options
context:
space:
mode:
authorTEHEK Firefox2011-10-11 22:37:00 +0000
committerIgor Minar2011-10-19 22:52:14 -0700
commit36928858104ba793dfc7372dbaa28048123d6e63 (patch)
treea797722f18f0da73316e5660f046f336c9e0c474 /src/Compiler.js
parent5d43439dbe764a4c7227f51b34a81b044f13901b (diff)
downloadangular.js-36928858104ba793dfc7372dbaa28048123d6e63.tar.bz2
fix(ng:options): compile null/blank option tag
Fixes #562
Diffstat (limited to 'src/Compiler.js')
-rw-r--r--src/Compiler.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Compiler.js b/src/Compiler.js
index 23bce084..1b079fc2 100644
--- a/src/Compiler.js
+++ b/src/Compiler.js
@@ -33,7 +33,14 @@ Template.prototype = {
paths = this.paths,
length = paths.length;
for (i = 0; i < length; i++) {
- children[i].link(jqLite(childNodes[paths[i]]), childScope);
+ // sometimes `element` can be modified by one of the linker functions in `this.linkFns`
+ // and childNodes may be added or removed
+ // TODO: element structure needs to be re-evaluated if new children added
+ // if the childNode still exists
+ if (childNodes[paths[i]])
+ children[i].link(jqLite(childNodes[paths[i]]), childScope);
+ else
+ delete paths[i]; // if child no longer available, delete path
}
},