File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1111 import type { ToolFront } from " $lib/types/Tool" ;
1212 import { page } from " $app/stores" ;
1313 import { onMount } from " svelte" ;
14+ import { browser } from " $app/environment" ;
1415
1516 export let tool: MessageToolUpdate [];
1617 export let loading: boolean = false ;
2627
2728 let isShowingLoadingBar = false ;
2829 onMount (() => {
29- if (! toolDone && loading ) {
30+ if (! toolDone && loading && loadingBarEl ) {
3031 loadingBarEl .classList .remove (" hidden" );
3132 isShowingLoadingBar = true ;
3233 animation = loadingBarEl .animate ([{ width: " 0%" }, { width: " calc(100%+1rem)" }], {
3940
4041 // go to 100% quickly if loading is done
4142 $ : (! loading || toolDone ) &&
43+ browser &&
44+ loadingBarEl &&
4245 isShowingLoadingBar &&
4346 (() => {
4447 isShowingLoadingBar = false ;
You can’t perform that action at this time.
0 commit comments