Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return createViewPromise.then(function (view) {
return fin(updateView(view).then(function () {
return queryView(view, opts);
}), function () {
return view.db.destroy();
});
});
});