From 7af6778649cd4c9850b24b5289666230d542e633 Mon Sep 17 00:00:00 2001 From: Andrew Courtice Date: Tue, 7 Sep 2021 09:36:06 +1000 Subject: [PATCH] fix(extensions): added sender constant to lazy extension --- extensions/lazy/src/constants.ts | 1 + extensions/lazy/src/index.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 extensions/lazy/src/constants.ts diff --git a/extensions/lazy/src/constants.ts b/extensions/lazy/src/constants.ts new file mode 100644 index 00000000..7b95cd24 --- /dev/null +++ b/extensions/lazy/src/constants.ts @@ -0,0 +1 @@ +export const SENDER = 'extension:lazy'; \ No newline at end of file diff --git a/extensions/lazy/src/index.ts b/extensions/lazy/src/index.ts index 230c33d8..82432195 100644 --- a/extensions/lazy/src/index.ts +++ b/extensions/lazy/src/index.ts @@ -1,3 +1,7 @@ +import { + SENDER, +} from './constants'; + import { EVENTS, BaseState, @@ -52,7 +56,7 @@ export default function lazyExtension() { const output = store.track(() => computedAsync(async onInvalidate => { const result = await body(store.state, onInvalidate); - nextTick(() => store.emit(EVENTS.devtools.update, 'lazy', result)); + nextTick(() => store.emit(EVENTS.devtools.update, SENDER, result)); return result; }, defaultValue));