Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4829

TypeError: t[m] is not a function

$
0
0

@Wayne_Douglas wrote:

Anyone have any idea what would cause this?

TypeError: t[m] is not a function
    at Object.applyStr (ember.debug.js:22856)
    at Object.sendEvent (ember.debug.js:16566)
    at notifyObservers (ember.debug.js:20211)
    at Object.propertyDidChange (ember.debug.js:20038)
    at Object.set (ember.debug.js:20476)
    at exports.default._emberMetalMixin.Mixin.create.set (ember.debug.js:34754)
    at component.js:103
    at tryCatch (ember.debug.js:52958)
    at invokeCallback (ember.debug.js:52973)
    at publish (ember.debug.js:52941)

The line that fires in in my code is here:

this.get('lineupService').getViewModelForEvent(query, this.get('days'))
    .then((models) => {
	this.set('locations', models.filterOptions.locations.mapBy('name'));
	this.set('suggestions', models.filterOptions.predictions);
	this.set('days', models.filterOptions.days);
	this.set('lineup', models.lineup); // <<<< throws here
});

This code is called a few times - once when the component is loaded and then again when the user changes something to filter the results. Each time it goes off to the server using ember-data. The first time it's called it works fine. When it is called due to a filter change it throws this error. If I refresh (i'm using query params) and the same filters are ran then it is OK.

I'm at a complete loss!

models.lineup is an ember data collection if that helps?!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles