Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.
This repository was 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

@jarrodek

Description

@jarrodek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions