diff --git a/src/pages/filters.jsx b/src/pages/filters.jsx index a0c05118..0d83d27e 100644 --- a/src/pages/filters.jsx +++ b/src/pages/filters.jsx @@ -286,7 +286,13 @@ function FiltersAddEdit({ filter, onClose }) { // Preserve existing expiry if not specified // Seconds from now to expiresAtDate // Other clients don't do this - expiresIn = Math.floor((expiresAtDate - new Date()) / 1000); + if (hasExpiry) { + expiresIn = Math.floor( + (expiresAtDate - new Date()) / 1000, + ); + } else { + expiresIn = null; + } } else if (expiresIn === '0' || expiresIn === 0) { // 0 = Never expiresIn = null;