genkgo / ember-localforage-adapter

Offline usage for Ember Data, based on localstorage adapter, but now uses Mozilla's localforage as data source
Other
133 stars 26 forks source link

Wait until record deletion is persisted before resolving promise from deleteRecord #1

Closed kibiz0r closed 9 years ago

kibiz0r commented 9 years ago

DS.LFAdapter.deleteRecord calls persistData and then immediately resolves the deletion promise: https://github.com/genkgo/ember-localforage-adapter/blob/master/localforage_adapter.js#L287

This seems wrong, for one thing, but might this also open the door to find()s incorrectly retrieving an about-to-be-deleted record?

It's hard for me to tell at the moment because of another issue, which I will list separately.

genkgo commented 9 years ago

This is issue has been resolved by the recent commit. Will tag a new version today that you can use. Thank you for contributing to this package.