Skip to content

Commit

Permalink
fix: 异步方法缓存key为空字符串时不需要缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
caijf committed May 15, 2024
1 parent 8d88dd5 commit 1536257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AsyncMemo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AsyncMemo<DataType = any> {
persisted?: boolean;
}
) {
if (!isString(key)) {
if (!key || !isString(key)) {
return asyncFn();
}

Expand Down

0 comments on commit 1536257

Please sign in to comment.