I have the following Backbone View with a render function that looks like the following:
render: function () {
this.emptyContent();
if (this.model.get('ChatsInQueue') == -1) {
this.model.set('ChatsInQueue', '-');
}
this.$el.append(this.template({ Stats: this.model.toJSON(), Prior: this.model.get('PriorDayStats') }));
var self = this;
this.graphView.model.fetch({
success: function () {
self.graphView.render(this.model.get("TotalCalls"), this.model.get("CallsAbandoned"));
}
});
this.tickerTapeText();
$(window).trigger('resize');
However, when I run the application, I receive the following console error:
Uncaught TypeError: Cannot read property 'get' of undefined
at success
Can someone help me diagnose what about my success function needs changed so that 'get' is defined?