Skip to content

Commit

Permalink
fix: TypeError: (intermediate value) is not iterable #195
Browse files Browse the repository at this point in the history
  • Loading branch information
dong-sir committed Jun 29, 2024
1 parent b8c72f4 commit 06ef2d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function withCache( cacheInstance : Cache|undefined, key : any[], v

const hashedKey = hash(...key);
const valueStr = await cacheInstance.get(hashedKey);
if ( valueStr !== undefined )
if ( typeof valueStr === 'string' )
return JSON.parse(valueStr);

const value = await valueFactory(api);
Expand Down

0 comments on commit 06ef2d9

Please sign in to comment.