javascript - Cannot call method indexOf undefined -


i'm getting error, cannotcall method indexof 'undefined' when using ko utils array filter . . .

view model:

viewmodel.people = ko.mapping.fromjs(people);   self.filter1 = ko.observable();        self.filteredsystem = ko.computed(function () {      var filter1 = self.filter1();           return ko.utils.arrayfilter(viewmodel.people(), function (people) {              return ((people.name.indexof(filter1) !== -1));          });   }, self); 

because used mapping plugin, name property going observable , have unwrap (people.name().indexof...) value.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -