mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
UBERF-5349 Fix incorrect store callback usage (#4554)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
parent
04fa2ca777
commit
6357efda60
@ -1,9 +1,15 @@
|
|||||||
<script lang="ts" context="module">
|
<script lang="ts" context="module">
|
||||||
import { readable } from 'svelte/store'
|
import { readable } from 'svelte/store'
|
||||||
const ticker = readable(Date.now(), (set) => {
|
const ticker = readable(Date.now(), (set) => {
|
||||||
setInterval(() => {
|
set(Date.now())
|
||||||
|
|
||||||
|
const interval = setInterval(() => {
|
||||||
set(Date.now())
|
set(Date.now())
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
clearInterval(interval)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -251,9 +251,15 @@ export function createApp (target: HTMLElement): SvelteComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const ticker = readable(Date.now(), (set) => {
|
export const ticker = readable(Date.now(), (set) => {
|
||||||
setInterval(() => {
|
set(Date.now())
|
||||||
|
|
||||||
|
const interval = setInterval(() => {
|
||||||
set(Date.now())
|
set(Date.now())
|
||||||
}, 10000)
|
}, 10000)
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
clearInterval(interval)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
addLocation(uiId, async () => ({ default: async () => ({}) }))
|
addLocation(uiId, async () => ({ default: async () => ({}) }))
|
||||||
|
Loading…
Reference in New Issue
Block a user