We have a problem with promises [pouchdb.com]