backbone.memento icon indicating copy to clipboard operation
backbone.memento copied to clipboard

support for using extensions to Backbone.Model

Open shakerlxxv opened this issue 12 years ago • 0 comments

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.

shakerlxxv avatar Aug 29 '12 03:08 shakerlxxv