Don't explicitly import Event to address Pouchdb's eventemitter limits
This commit is contained in:
parent
db45c55028
commit
0dcb6600fa
@ -6,10 +6,6 @@ import { router } from './services/router.js';
|
||||
import { streamConfig } from './utils/event.js';
|
||||
import { log } from './services/console.js';
|
||||
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
EventEmitter.defaultMaxListeners = 1000; // https://github.com/pouchdb/pouchdb/issues/6123
|
||||
|
||||
config({ stream: streamConfig });
|
||||
|
||||
function go() {
|
||||
|
||||
@ -93,6 +93,7 @@ export function PouchORM(PouchDB) {
|
||||
PouchDB.registerType = (name, cls, db) => {
|
||||
const prefix = name.toLowerCase();
|
||||
const _db = db || PouchDB(prefix);
|
||||
_db.setMaxListeners(1000);
|
||||
const _baseSelector = Object.freeze({
|
||||
_id: { $gt: `${prefix}_0`, $lt: `${prefix}_\ufff0` }
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user