Index: lib/common.js |
=================================================================== |
--- a/lib/common.js |
+++ b/lib/common.js |
@@ -197,20 +197,20 @@ |
for (let sub of splitSelector(selector)) |
{ |
sub = sub.trim(); |
qualifiedSelector += ", "; |
let index = findTargetSelectorIndex(sub); |
- let [, type = "", rest] = /^([a-z][a-z-]*)?(.*)/i.exec(sub.substr(index)); |
+ let [, type = "", rest] = /^([a-z][a-z-]*)?(.*)/i.exec(sub.substring(index)); |
// Note that the first group in the regular expression is optional. If it |
// doesn't match (e.g. "#foo::nth-child(1)"), type will be an empty string. |
- qualifiedSelector += sub.substr(0, index) + type + qualifier + rest; |
+ qualifiedSelector += sub.substring(0, index) + type + qualifier + rest; |
} |
// Remove the initial comma and space. |
- return qualifiedSelector.substr(2); |
+ return qualifiedSelector.substring(2); |
} |
exports.qualifySelector = qualifySelector; |