Skip to content

Commit 06ef2d9

Browse files
committed
fix: TypeError: (intermediate value) is not iterable #195
1 parent b8c72f4 commit 06ef2d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export async function withCache( cacheInstance : Cache|undefined, key : any[], v
120120

121121
const hashedKey = hash(...key);
122122
const valueStr = await cacheInstance.get(hashedKey);
123-
if ( valueStr !== undefined )
123+
if ( typeof valueStr === 'string' )
124124
return JSON.parse(valueStr);
125125

126126
const value = await valueFactory(api);

0 commit comments

Comments
 (0)