From ae40a942945e0fd3def6f28115075e4994901e28 Mon Sep 17 00:00:00 2001 From: yushiang Date: Tue, 5 Mar 2024 21:35:37 +0800 Subject: [PATCH] fix: decoration, viewer pages runtime error . --- CHANGELOG.md | 2 ++ apps/editors/decoration/index.js | 2 ++ apps/viewer.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0200a70..d72a0cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ The format is based on [Keep a Changelog](https://github.com/olivierlacan/keep-a ### Fixed +- Fix `decoration`, `viewer` pages runtime error. (https://github.com/yushiang-demo/pano-to-mesh/pull/77) + ### Removed ## [2.1.1] - 2024-03-05 diff --git a/apps/editors/decoration/index.js b/apps/editors/decoration/index.js index 7e8e695..19e31f6 100644 --- a/apps/editors/decoration/index.js +++ b/apps/editors/decoration/index.js @@ -153,6 +153,8 @@ const Editor = ({ data }) => { [focusedIndex] ); + if (!panorama) return null; + return ( <> diff --git a/apps/viewer.js b/apps/viewer.js index 5991170..113c565 100644 --- a/apps/viewer.js +++ b/apps/viewer.js @@ -114,6 +114,8 @@ const Viewer = ({ data }) => { ); }); + if (!panorama) return null; + return ( <>