Closed nmartin413 closed 10 years ago
Hum. Did the test fail previously for you?
Yes, without the re-ordering
I have the same issue. .done() can get fired before it's actually successful. Re-ordering the two lines as below seems to fix it.
resolve();
if (success) success(resp);
Please, feel free to submit a Pull Request so I can close that issue :)
Wonderful work going on here!
However, I think I might have stumbled across a bit of a logical issue. It seems the sync function is resolving it's deferreds before it actually syncs the model up:
Which causes something like this to fail:
Modifying my local copy of backbone.indexeddb.js to reorder the sync and resolve causes this test to pass. Is this something that should be changed? (I believe the error callback also would be considered...)