Skip to content

Commit 2ee3d4d

Browse files
committed
fallback if no hash
1 parent 367bbf4 commit 2ee3d4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ app.get('/', async (req, res) => {
2727

2828
let data;
2929

30-
if (isCacheHit) {
30+
if (!hash) {
31+
data = [];
32+
} else if (isCacheHit) {
3133
console.log('cache hit');
3234
// get cached data
3335
data = cache[hash].data;

0 commit comments

Comments
 (0)