mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
refactor: jwt internal version migration
This commit is contained in:
@@ -81,7 +81,7 @@ class BlockScopedEventBus<T> extends BlockEventBus {
|
||||
options?: ListenerOptions
|
||||
) {
|
||||
if (options?.debounce) {
|
||||
const { wait, maxWait } = options.debounce;
|
||||
const { wait, maxWait = 500 } = options.debounce;
|
||||
const debounced = debounce(listener, wait, { maxWait });
|
||||
this.on_listener(this._topic, name, e => {
|
||||
debounced((e as CustomEvent)?.detail);
|
||||
|
||||
@@ -39,7 +39,9 @@ export function getLogger(namespace: string) {
|
||||
if (JWT_DEV) {
|
||||
const logger = debug(namespace);
|
||||
logger.log = console.log.bind(console);
|
||||
if (JWT_DEV === ('testing' as any)) logger.enabled = true;
|
||||
if (JWT_DEV === ('testing' as any)) {
|
||||
logger.enabled = true;
|
||||
}
|
||||
return logger;
|
||||
} else {
|
||||
return () => {};
|
||||
|
||||
Reference in New Issue
Block a user