Skip to content

Commit

Permalink
Show editor eevn if there is resource errors
Browse files Browse the repository at this point in the history
  • Loading branch information
djbarnwal committed Jan 6, 2025
1 parent 9e7d779 commit db53a72
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions web-common/src/features/workspaces/CanvasWorkspace.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
}
</script>

{#if canvasResource && fileArtifact}
{#if fileArtifact}
{#key canvasName}
<StateManagersProvider {canvasName}>
<CanvasThemeProvider>
Expand Down Expand Up @@ -168,7 +168,8 @@
<ErrorPage
body={mainError.message}
fatal
header="Unable to load dashboard preview"
detail={allErrors.map((error) => error.message).join("\n")}
header="Unable to load canvas preview"
statusCode={404}
/>
{:else if canvasResource}
Expand All @@ -182,13 +183,6 @@
</CanvasThemeProvider>
</StateManagersProvider>
{/key}
{:else if allErrors.length}
<ErrorPage
body="Please fix the errors in the code editor before previewing the dashboard."
header="Unable to load dashboard preview"
detail={allErrors.map((error) => error.message).join("\n")}
statusCode={404}
/>
{:else}
<div class="grid place-items-center size-full">
<DelayedSpinner isLoading={true} size="40px" />
Expand Down

0 comments on commit db53a72

Please sign in to comment.