Skip to content

Commit

Permalink
fix error logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Feb 13, 2023
1 parent 91d518a commit c46040d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/solid/src/reactive/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ export function createResource<T, S, R>(
}
function completeLoad(v: T | undefined, err: any) {
runUpdates(() => {
if (err !== undefined) setValue(() => v);
if (err === undefined) setValue(() => v);
setState(err !== undefined ? "errored" : "ready");
setError(err);
for (const c of contexts.keys()) c.decrement!();
Expand Down

0 comments on commit c46040d

Please sign in to comment.