From db3c03f18c42e84c058c08ea27a9387a192c23d5 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Mon, 22 Apr 2019 07:26:25 -0400 Subject: [PATCH] work around transition bug --- site/src/components/PreloadingIndicator.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/src/components/PreloadingIndicator.svelte b/site/src/components/PreloadingIndicator.svelte index 22980e2a6b..cc7d2ef057 100644 --- a/site/src/components/PreloadingIndicator.svelte +++ b/site/src/components/PreloadingIndicator.svelte @@ -3,6 +3,7 @@ import { fade } from 'svelte/transition'; let p = 0; + let visible = false; const sleep = ms => new Promise(f => setTimeout(f, ms)); @@ -10,6 +11,7 @@ let running = true; function next() { + visible = true; p += 0.1; const remaining = 1 - p; @@ -53,7 +55,7 @@ } -{#if p > 0} +{#if visible}