use Ox.indexOf, not Ox.getObject

This commit is contained in:
rolux 2012-05-21 09:41:57 +03:00
parent 503c2b5978
commit 344d7ec40d

View file

@ -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});