use Ox.indexOf, not Ox.getObject
This commit is contained in:
parent
503c2b5978
commit
344d7ec40d
1 changed files with 3 additions and 1 deletions
|
@ -1353,7 +1353,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
words.push({count: count, value: value});
|
words.push({count: count, value: value});
|
||||||
});
|
});
|
||||||
words.forEach(function(word) {
|
words.forEach(function(word) {
|
||||||
var index = Ox.getIndex(self.words, 'value', word.value);
|
var index = Ox.indexOf(self.words, function(w) {
|
||||||
|
return w.value === word.value;
|
||||||
|
});
|
||||||
if (action == 'add') {
|
if (action == 'add') {
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
self.words.push({count: 1, value: word.value});
|
self.words.push({count: 1, value: word.value});
|
||||||
|
|
Loading…
Reference in a new issue