Comparing version 0.15.1-beta to 0.15.2-beta
{ | ||
"name": "razorleaf", | ||
"version": "0.15.1-beta", | ||
"version": "0.15.2-beta", | ||
"main": "razorleaf.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -6,2 +6,14 @@ "use strict"; | ||
function isContained(element) { | ||
while(element.parent) { | ||
element = element.parent; | ||
if(element.type === "block") { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function loadExtends(tree, visited, options) { | ||
@@ -24,7 +36,9 @@ if(tree.extends) { | ||
if(!parentBlock) { | ||
if(parentBlock) { | ||
parentBlock.children = [tree.blocks[name]]; | ||
} else if(!isContained(tree.blocks[name])) { | ||
throw tree.blocks[name].replacesNonExistentBlock(); | ||
} | ||
parentBlock.children = [tree.blocks[name]]; | ||
newTree.blocks[name] = tree.blocks[name]; | ||
} | ||
@@ -31,0 +45,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26861
851