Skip to content

support for using extensions to Backbone.Model#15

Open
shakerlxxv wants to merge 1 commit intomxriverlynn:masterfrom
shakerlxxv:model_subclass
Open

support for using extensions to Backbone.Model#15
shakerlxxv wants to merge 1 commit intomxriverlynn:masterfrom
shakerlxxv:model_subclass

Conversation

@shakerlxxv
Copy link
Copy Markdown

I'm using another Backbone.js plugin which provides an extension of the Backbone.Model class. As a result,

   structure instanceof Backbone.Model

is returning false. Which subsequently results in an error when I'm calling model.restore() as memento attempts to call the reset() method which doesn't exist on my Model. This change to include a check for .reset method does work for me.

If there's a better way to do this to provide support for extensions to Backbone.Model, I'd be interested to learn it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant