fix corner case in conditionals (#5548)

This commit is contained in:
Alex Lam S.L
2022-07-07 14:28:33 +01:00
committed by GitHub
parent 902292f776
commit b92a89f325
2 changed files with 19 additions and 1 deletions

View File

@@ -1428,8 +1428,10 @@ var AST_Import = DEFNODE("Import", "all default path properties quote", {
},
_equals: function(node) {
return this.path == node.path
&& prop_equals(this.all, node.all)
&& prop_equals(this.default, node.default)
&& (this.all ? prop_equals(this.all, node.all) : all_equals(this.properties, node.properties));
&& !this.properties == !node.properties
&& (!this.properties || all_equals(this.properties, node.properties));
},
walk: function(visitor) {
var node = this;