Skip to content

Commit

Permalink
fix: computed function object check causes null error
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidWraga committed Jul 8, 2024
1 parent 84309be commit d99d59c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function computed<TReturnType>(
};

const proxyResult = fn('get');
if (typeof proxyResult === 'object' && 'set' in (proxyResult as any)) {
if (isObject(proxyResult) && 'set' in (proxyResult as any)) {
result.set = (value: any) => (proxyResult as any).set(value);
}

Expand Down

0 comments on commit d99d59c

Please sign in to comment.