Skip to content

Instantly share code, notes, and snippets.

@anthonybrown
Created February 24, 2014 11:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonybrown/9186767 to your computer and use it in GitHub Desktop.
Save anthonybrown/9186767 to your computer and use it in GitHub Desktop.
If you get `options undefined` error, it is because Backbone v.1.1.0 and later no longer automatically attach options passed to the constructor as this.options. This can be fixed by adding an initialized function to AppName.AppLayout = Backbone.View.extend().
AppName.AppLayout = Backbone.View.extend({
initialize: function(options){
this.options = options || {};
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment