fix corner case in ie8 (#3216)

fixes #3215
This commit is contained in:
Alex Lam S.L
2018-07-19 14:45:36 +08:00
committed by GitHub
parent 8d4b5344f4
commit cea685f8d9
7 changed files with 349 additions and 99 deletions

View File

@@ -172,9 +172,8 @@ function string_template(text, props) {
}
function remove(array, el) {
for (var i = array.length; --i >= 0;) {
if (array[i] === el) array.splice(i, 1);
}
var index = array.indexOf(el);
if (index >= 0) array.splice(index, 1);
}
function makePredicate(words) {