aboutsummaryrefslogtreecommitdiffstats
path: root/src/Compiler.js
diff options
context:
space:
mode:
authorIgor Minar2011-01-23 15:55:11 -0800
committerIgor Minar2011-01-24 14:03:42 -0800
commit5340d1e0b1c29103e187a1cdc33bbee48d98a74d (patch)
tree81371510596d7ac7aa4300f16fa58c92527f298a /src/Compiler.js
parent8d91ec4173a652da9fe984d12a50d6b1b4ef935f (diff)
downloadangular.js-5340d1e0b1c29103e187a1cdc33bbee48d98a74d.tar.bz2
fix for infinite loop in retrieveScope with jQuery + specs
- retrieveScope run into infinite loop if called on DOM tree that doesn't contain scope reference (happens only with jQuery) - added missing specs for retrieveScope function
Diffstat (limited to 'src/Compiler.js')
-rw-r--r--src/Compiler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compiler.js b/src/Compiler.js
index 3f5ba9e1..58a7a47b 100644
--- a/src/Compiler.js
+++ b/src/Compiler.js
@@ -75,7 +75,7 @@ Template.prototype = {
function retrieveScope(element) {
var scope;
element = jqLite(element);
- while (element && !(scope = element.data($$scope))) {
+ while (element && element.length && !(scope = element.data($$scope))) {
element = element.parent();
}
return scope;