We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7733a8 commit 9f38df3Copy full SHA for 9f38df3
src/PageCollector.ts
@@ -91,7 +91,12 @@ export class PageCollector<T> {
91
this.storage.set(page, storedLists);
92
93
const listeners = this.#listenersInitializer(value => {
94
- const withId = value as WithSymbolId<T>;
+ let withId: WithSymbolId<T>;
95
+ if (value === undefined || value === null) {
96
+ withId = {} as WithSymbolId<T>;
97
+ } else {
98
+ withId = value as WithSymbolId<T>;
99
+ }
100
withId[stableIdSymbol] = idGenerator();
101
102
const navigations = this.storage.get(page) ?? [[]];
0 commit comments