aboutsummaryrefslogtreecommitdiffstats
path: root/src/Compiler.js
diff options
context:
space:
mode:
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;