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 ( <>