For variables that don't exist for a site, replace with selector that matches nothing. #2169

This commit is contained in:
ccd0 2019-07-08 14:35:43 -07:00
parent 86dac2b085
commit 6a7c3d7c38

View File

@ -26,10 +26,10 @@ sub: function(css) {
var words = name.slice(1).split('$');
var sel = variables;
for (var i = 0; i < words.length; i++) {
if (typeof sel !== 'object') return name;
if (typeof sel !== 'object') return ':not(*)';
sel = sel[words[i]];
}
if (typeof sel !== 'string') return name;
if (typeof sel !== 'string') return ':not(*)';
return sel;
});
}