Skip to content

Commit 7278ae4

Browse files
SourceR85Steven-John Lange
andauthored
(#8607) - replace immediate with queueMicrotask
Co-authored-by: Steven-John Lange <s.lange@hz-deutschland.de>
1 parent 1d1a08e commit 7278ae4

4 files changed

Lines changed: 6 additions & 18 deletions

File tree

‎package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"double-ended-queue": "2.1.0-0",
4444
"fetch-cookie": "2.1.0",
4545
"fruitdown": "1.0.2",
46-
"immediate": "3.3.0",
4746
"level": "6.0.1",
4847
"level-codec": "9.0.2",
4948
"level-write-stream": "1.0.0",

‎packages/node_modules/pouchdb-utils/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"./src/cloneBinaryObject.js": "./src/cloneBinaryObject-browser.js",
1818
"./src/env/hasLocalStorage.js": "./src/env/hasLocalStorage-browser.js",
1919
"./src/explainError.js": "./src/explainError-browser.js",
20-
"./src/isBinaryObject.js": "./src/isBinaryObject-browser.js",
21-
"./src/nextTick.js": "./src/nextTick-browser.js"
20+
"./src/isBinaryObject.js": "./src/isBinaryObject-browser.js"
2221
}
2322
}

‎packages/node_modules/pouchdb-utils/src/nextTick-browser.js‎

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
function nextTick(fn) {
2-
process.nextTick(fn);
3-
}
1+
const nextTick = typeof queueMicrotask === "function"
2+
? queueMicrotask
3+
: function nextTick(fn) {
4+
Promise.resolve().then(fn);
5+
};
46

57
export default nextTick;

0 commit comments

Comments
 (0)