derickbailey/backbone.memento — pull request #15 by shakerlxxv (2012-08-29 03:35:12+00:00)
Title: support for using extensions to Backbone.Model

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

```JavaScript
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.