For variables that don't exist for a site, replace with selector that matches nothing. #2169
This commit is contained in:
parent
86dac2b085
commit
6a7c3d7c38
@ -26,10 +26,10 @@ sub: function(css) {
|
|||||||
var words = name.slice(1).split('$');
|
var words = name.slice(1).split('$');
|
||||||
var sel = variables;
|
var sel = variables;
|
||||||
for (var i = 0; i < words.length; i++) {
|
for (var i = 0; i < words.length; i++) {
|
||||||
if (typeof sel !== 'object') return name;
|
if (typeof sel !== 'object') return ':not(*)';
|
||||||
sel = sel[words[i]];
|
sel = sel[words[i]];
|
||||||
}
|
}
|
||||||
if (typeof sel !== 'string') return name;
|
if (typeof sel !== 'string') return ':not(*)';
|
||||||
return sel;
|
return sel;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user