Skip to content

Commit

Permalink
Use skipVoid: false
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrHoroshih committed Oct 12, 2023
1 parent 4b61108 commit 01bbf43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/debounce/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function debounce<T>({
$timeoutId.reset(timerFx.done);

// It's ok - nothing will ever start unless source is triggered
const $payload = createStore<T[]>([], { serialize: 'ignore' }).on(
const $payload = createStore<T[]>([], { serialize: 'ignore', skipVoid: false }).on(
source,
(_, payload) => [payload],
);
Expand Down
8 changes: 4 additions & 4 deletions src/throttle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export function throttle<T>({
});

// It's ok - nothing will ever start unless source is triggered
const $payload = createStore<T>(null as unknown as T, { serialize: 'ignore' }).on(
source,
(_, payload) => payload,
);
const $payload = createStore<T>(null as unknown as T, {
serialize: 'ignore',
skipVoid: false,
}).on(source, (_, payload) => payload);

const triggerTick = createEvent<T>();

Expand Down

0 comments on commit 01bbf43

Please sign in to comment.