alekseykulikov/backbone-offline

Remove model doesn't update localstorage?

bbence84 opened this issue · 1 comments

Currently I'm testing backbone.offline without a real backend. If I do fetch and pass local: true, it works correctly, and also saving models saves correctly.
However if I do:
var model = Logs.get($(this).parent().data('cid')); // this works, returns the correct model
Logs.remove(model);
The model is removed from the collection but upon a refresh the next fetch (local: true) reads it again. How I can make backbone.offline also delete the localstorage model?

Thanks!
Bence

The reason for that, because backbone.offline requires backend, if you removed something it will try to sync your changes. Please, take a look at https://github.com/Ask11/dreamy as example.