Skip to content

Commit

Permalink
refactor(cache): remove unnecessary nullish coalescing operator (#2608)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpearson authored Sep 20, 2024
1 parent cb09358 commit 12c39e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/internal/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function defineCachedFunction<T, ArgsT extends unknown[] = any[]>(
useNitroApp().captureError(error, { event, tags: ["cache"] });
}

const ttl = (opts.maxAge ?? opts.maxAge ?? 0) * 1000;
const ttl = (opts.maxAge ?? 0) * 1000;
if (ttl) {
entry.expires = Date.now() + ttl;
}
Expand Down

0 comments on commit 12c39e4

Please sign in to comment.