summaryrefslogtreecommitdiff
path: root/apps/web/src/components/providers/editor-provider.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-19 07:42:52 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-19 07:42:52 +0200
commit729d10592f4e802f91c555c309ff3ba4b119f843 (patch)
treea547a6d1ba90ca9cc03f406e0160df0af987644d /apps/web/src/components/providers/editor-provider.tsx
parent9da365bc01fc54f6d3f0ca9c3212eee4c0cee7cd (diff)
downloadopencut-729d10592f4e802f91c555c309ff3ba4b119f843.tar.gz
fix: WebGL frame rendering and opencut-wasm 0.2.8
Diffstat (limited to 'apps/web/src/components/providers/editor-provider.tsx')
-rw-r--r--apps/web/src/components/providers/editor-provider.tsx18
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/web/src/components/providers/editor-provider.tsx b/apps/web/src/components/providers/editor-provider.tsx
index cac954ba..98e6d4c6 100644
--- a/apps/web/src/components/providers/editor-provider.tsx
+++ b/apps/web/src/components/providers/editor-provider.tsx
@@ -10,7 +10,10 @@ import { useKeybindingsStore } from "@/stores/keybindings-store";
import { useTimelineStore } from "@/stores/timeline-store";
import { useEditorActions } from "@/hooks/actions/use-editor-actions";
import { loadFontAtlas } from "@/lib/fonts/google-fonts";
-import { initializeGpuRenderer, isGpuAvailable } from "@/services/renderer/gpu-renderer";
+import {
+ initializeGpuRenderer,
+ isGpuAvailable,
+} from "@/services/renderer/gpu-renderer";
interface EditorProviderProps {
projectId: string;
@@ -62,9 +65,16 @@ export function EditorProvider({ projectId, children }: EditorProviderProps) {
setIsLoading(false);
}
} else {
- setError(
- err instanceof Error ? err.message : "Failed to load project",
- );
+ const wasmPanic = (window as Window & { __wasmPanic?: string })
+ .__wasmPanic;
+ if (wasmPanic) {
+ delete (window as Window & { __wasmPanic?: string }).__wasmPanic;
+ setError(wasmPanic);
+ } else {
+ setError(
+ err instanceof Error ? err.message : "Failed to load project",
+ );
+ }
setIsLoading(false);
}
}