Skip to content

Commit 02b4b25

Browse files
committed
fix: allow setting 0 (zero) as maxAge
1 parent 6d28902 commit 02b4b25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cache-control.decorator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const CacheControl = ({
1212
inheritMaxAge,
1313
}: CacheControlOptions) =>
1414
Directive(
15-
`@cacheControl(scope: ${scope}${maxAge ? `, maxAge: ${maxAge}` : ''}${
15+
`@cacheControl(scope: ${scope}${maxAge !== undefined ? `, maxAge: ${maxAge}` : ''}${
1616
inheritMaxAge ? `, inheritMaxAge: ${inheritMaxAge}` : ''
1717
})`
1818
);

0 commit comments

Comments
 (0)