mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Fix filter expiry wrongly set if there's no expiry
This commit is contained in:
parent
5433e4e119
commit
11e64a2cc4
1 changed files with 7 additions and 1 deletions
|
@ -286,7 +286,13 @@ function FiltersAddEdit({ filter, onClose }) {
|
||||||
// Preserve existing expiry if not specified
|
// Preserve existing expiry if not specified
|
||||||
// Seconds from now to expiresAtDate
|
// Seconds from now to expiresAtDate
|
||||||
// Other clients don't do this
|
// 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) {
|
} else if (expiresIn === '0' || expiresIn === 0) {
|
||||||
// 0 = Never
|
// 0 = Never
|
||||||
expiresIn = null;
|
expiresIn = null;
|
||||||
|
|
Loading…
Reference in a new issue