mirror of
https://github.com/KevinMidboe/brewPi.git
synced 2025-10-29 16:50:12 +00:00
Clear timeout when destroying/navigating away from page
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import Graph from '../../lib/components/Graph.svelte';
|
import Graph from '../../lib/components/Graph.svelte';
|
||||||
import type IChartFrame from '../../lib/interfaces/IChartFrame';
|
import type IChartFrame from '../../lib/interfaces/IChartFrame';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMount(scrollSelectedButtonIntoView);
|
onMount(scrollSelectedButtonIntoView);
|
||||||
|
onDestroy(() => clearTimeout(timeout))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="button-wrapper">
|
<div class="button-wrapper">
|
||||||
|
|||||||
Reference in New Issue
Block a user