Skip to content

Commit 081dd1f

Browse files
committed
* fixed *undefined* problem when used variables value with *isImportant* key.
1 parent 455cc21 commit 081dd1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/find-node-ancestor-with-selector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var findNodeAncestorWithSelector = function(selector, node) {
88
// Keep going until we run out of parents to search
99
// or we found the node
1010
var currentNode = node;
11-
while(currentNode.parent && !matchingNode) {
11+
while(currentNode && currentNode.parent && !matchingNode) {
1212
// A trick to get the selector split up. Generate a scope list on a clone(clean parent)
1313
var currentNodeScopeList = generateScopeList(currentNode.clone(), true);
1414

0 commit comments

Comments
 (0)