Skip to content

Commit 7ae5fe7

Browse files
process.nextTick not available in browser environment
1 parent 7b5f8eb commit 7ae5fe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ export class Database extends EventEmitter {
123123

124124
/** Emits given event with optional arguments on the next tick so callbacks can complete first */
125125
private emitEvent(event: string, ...args: any[]): void {
126-
process.nextTick(() => {
126+
setTimeout(() => {
127127
this.emit(event, ...args)
128-
})
128+
}, 0)
129129
}
130130

131131
//

0 commit comments

Comments
 (0)