mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +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">
|
||||
import { readable } from 'svelte/store'
|
||||
const ticker = readable(Date.now(), (set) => {
|
||||
setInterval(() => {
|
||||
set(Date.now())
|
||||
|
||||
const interval = setInterval(() => {
|
||||
set(Date.now())
|
||||
}, 100)
|
||||
|
||||
return () => {
|
||||
clearInterval(interval)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -251,9 +251,15 @@ export function createApp (target: HTMLElement): SvelteComponent {
|
||||
}
|
||||
|
||||
export const ticker = readable(Date.now(), (set) => {
|
||||
setInterval(() => {
|
||||
set(Date.now())
|
||||
|
||||
const interval = setInterval(() => {
|
||||
set(Date.now())
|
||||
}, 10000)
|
||||
|
||||
return () => {
|
||||
clearInterval(interval)
|
||||
}
|
||||
})
|
||||
|
||||
addLocation(uiId, async () => ({ default: async () => ({}) }))
|
||||
|
Loading…
Reference in New Issue
Block a user