diff --git a/routes/_components/compose/ComposeAutosuggest.html b/routes/_components/compose/ComposeAutosuggest.html index 78dc03db..6d42a909 100644 --- a/routes/_components/compose/ComposeAutosuggest.html +++ b/routes/_components/compose/ComposeAutosuggest.html @@ -59,14 +59,14 @@ // perf improves for input responsiveness this.observe('composeSelectionStart', () => { scheduleIdleTask(() => { - let { composeSelectionStart } = this.get() || {} // TODO: wtf svelte? + let { composeSelectionStart } = this.get() || {} // // https://github.com/sveltejs/svelte/issues/1354 this.set({composeSelectionStartDeferred: composeSelectionStart}) }) }) this.observe('composeFocused', (composeFocused) => { let updateFocusedState = () => { scheduleIdleTask(() => { - let { composeFocused } = this.get() || {} // TODO: wtf svelte? + let { composeFocused } = this.get() || {} // // https://github.com/sveltejs/svelte/issues/1354 this.set({composeFocusedDeferred: composeFocused}) }) } diff --git a/routes/_components/compose/ComposeLengthGauge.html b/routes/_components/compose/ComposeLengthGauge.html index d187e1e5..5408b87f 100644 --- a/routes/_components/compose/ComposeLengthGauge.html +++ b/routes/_components/compose/ComposeLengthGauge.html @@ -31,7 +31,7 @@ this.observe('lengthAsFraction', () => { scheduleIdleTask(() => { mark('set lengthAsFractionDeferred') - let { lengthAsFraction } = this.get() || {} // TODO: wtf svelte? + let { lengthAsFraction } = this.get() || {} // https://github.com/sveltejs/svelte/issues/1354 this.set({lengthAsFractionDeferred: lengthAsFraction}) stop('set lengthAsFractionDeferred') requestAnimationFrame(() => this.set({shouldAnimate: true})) diff --git a/routes/_components/compose/ComposeLengthIndicator.html b/routes/_components/compose/ComposeLengthIndicator.html index 9b054ccf..d09afb6c 100644 --- a/routes/_components/compose/ComposeLengthIndicator.html +++ b/routes/_components/compose/ComposeLengthIndicator.html @@ -29,7 +29,7 @@ this.observe('lengthToDisplay', () => { scheduleIdleTask(() => { mark('set lengthToDisplayDeferred') - let { lengthToDisplay } = this.get() || {} // TODO: wtf svelte? + let { lengthToDisplay } = this.get() || {} // // https://github.com/sveltejs/svelte/issues/1354 this.set({lengthToDisplayDeferred: lengthToDisplay}) stop('set lengthToDisplayDeferred') }) diff --git a/routes/_components/pseudoVirtualList/PseudoVirtualListItem.html b/routes/_components/pseudoVirtualList/PseudoVirtualListItem.html index 5e0f9773..15dcc832 100644 --- a/routes/_components/pseudoVirtualList/PseudoVirtualListItem.html +++ b/routes/_components/pseudoVirtualList/PseudoVirtualListItem.html @@ -26,7 +26,7 @@ // unrender lazily; it's not a critical UI task scheduleIdleTask(() => { mark('unrender') - let { isIntersecting } = this.get() || {} // TODO: wtf svelte? + let { isIntersecting } = this.get() || {} // https://github.com/sveltejs/svelte/issues/1354 if (!isIntersecting) { this.set({hide: true}) } diff --git a/routes/_components/timeline/Timeline.html b/routes/_components/timeline/Timeline.html index e87244a6..8d1a44d1 100644 --- a/routes/_components/timeline/Timeline.html +++ b/routes/_components/timeline/Timeline.html @@ -166,13 +166,12 @@ this.set({scrollTop: scrollTop}) }, onScrollToBottom () { - let { - timelineInitialized, - runningUpdate - } = this.store.get() - let { - timelineType - } = this.get() + let state = this.store.get() + if (!state) { + return // https://github.com/sveltejs/svelte/issues/1354 + } + let { timelineType } = state + let { timelineInitialized, runningUpdate } = this.store.get() if (!timelineInitialized || runningUpdate || timelineType === 'status') { // for status contexts, we've already fetched the whole thread @@ -198,7 +197,7 @@ let { currentInstance } = this.store.get() let { timeline } = this.get() let handleItemIdsToAdd = () => { - let { itemIdsToAdd } = this.get() || {} // TODO: wtf svelte? + let { itemIdsToAdd } = this.get() || {} // // https://github.com/sveltejs/svelte/issues/1354 if (!itemIdsToAdd || !itemIdsToAdd.length) { return }