Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Call to reset function in the destroy function in app-pouchdb-document out of scope #37

Open
jarrodek opened this issue Feb 5, 2017 · 0 comments

Comments

@jarrodek
Copy link

jarrodek commented Feb 5, 2017

Description

In app-pouchdb-document there's a fragment where clearly call to this.reset(); is out of scope:

destroy: function() {
  this.set('data._deleted', true);
  return this.transactionsComplete.then(function() {
    return this.reset();
  });
},

This causes calls to this function to always fail. Though, the item is deleted from the store.

Expected outcome

Not fail :)

Actual outcome

Promise rejection due the error.

Live Demo

https://jsbin.com/wiroqef/4/edit?html,js,output

Steps to reproduce

See demo.

Browsers Affected

Browser independent. It will always fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant