Skip to content

Commit

Permalink
fix: default value for falsesy values in useData
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Aug 17, 2024
1 parent 96525ac commit cc48e3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/composables/useDataLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function useData<T, P extends Record<string, unknown> | string>(

function load(params: P) {
status.value = "loading";
setState(defaultValue || undefined);
setState(defaultValue ?? undefined);

if (skip(params)) {
console.log("skip", key(params));
Expand Down

0 comments on commit cc48e3d

Please sign in to comment.