Sunday, April 8, 2012

Backbone.js: `extend` undefined?



Just getting started with Backbone.js. Simply including Backbone (either dev/production versions) causes the error:





Uncaught TypeError: Cannot call method 'extend' of undefined on Line 128:





// Attach all inheritable methods to the Model prototype. _.extend(Backbone.Model.prototype, Backbone.Events, {



Source: Tips4all

1 comment:

  1. The issue was that I wan't loading underscore.js. I totally missed that dependency in the docs. Duh.

    ReplyDelete