You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Correct incorrect Promise() invocation
you're supposed to call Promise() as a constructor rather than a static function.
This commit is contained in:
@@ -44,7 +44,7 @@ function createDatabase(db) {
|
||||
*/
|
||||
function selectQuery(store, keyRange, resultMapper) {
|
||||
const query = store.openCursor(keyRange);
|
||||
return Promise((resolve, reject) => { /*eslint new-cap: 0*/
|
||||
return new Promise((resolve, reject) => {
|
||||
const results = [];
|
||||
query.onerror = (event) => {
|
||||
reject(new Error("Query failed: " + event.target.errorCode));
|
||||
|
||||
Reference in New Issue
Block a user