Fixed NaN in clock

This commit is contained in:
Gunnar Skjold 2023-05-22 10:26:12 +02:00
parent 550d32ee33
commit a57405a7a5
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,10 +6,10 @@
export let offset;
let showFull;
let adjusteTimestamp;
$:{
showFull = Math.abs(new Date().getTime()-timestamp.getTime()) < 300000;
addHours(timestamp, offset);
if(!isNaN(offset))
addHours(timestamp, offset);
}
</script>