Skip to content

Commit 069449a

Browse files
committed
fixing views count on permanent links creation
1 parent 652f4d7 commit 069449a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/$/[shortSlug]/+server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const GET = async ({ locals, params }) => {
77
link = await locals.pb.collection('links').getFirstListItem(`shortSlug="${params.shortSlug}"`)
88

99
if (link) {
10-
if (parseInt(link.expiration) > Date.now()) {
10+
if (parseInt(link.expiration) > Date.now() || link.expiration === 'Infinity') {
1111
await locals.pb.collection('links').update(link.id, {
1212
views: link.views + 1
1313
})

0 commit comments

Comments
 (0)