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

nested arrays/objects

Open KidkArolis opened this issue 12 years ago • 0 comments

Any suggestions how to deal with models that have an array as an attribute? Doing model.store(), modifying the array, model.restore() won't work, because the array was modified by reference.

What I did was pretty much replace _.clone with JSON.stringify, it does the job for me :) But I wonder if you've used memento with such models.

KidkArolis avatar Jul 13 '12 21:07 KidkArolis