From ae40a942945e0fd3def6f28115075e4994901e28 Mon Sep 17 00:00:00 2001 From: yushiang Date: Tue, 5 Mar 2024 21:35:37 +0800 Subject: [PATCH 1/4] 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 ( <> From 429b1a9d5c27f4d817a5ee5e2fcd11e9b7bb91ae Mon Sep 17 00:00:00 2001 From: yushiang Date: Tue, 5 Mar 2024 21:37:34 +0800 Subject: [PATCH 2/4] fix: changelog wrong pr link. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d72a0cf..8873a16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ 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) +- Fix `decoration`, `viewer` pages runtime error. (https://github.com/yushiang-demo/pano-to-mesh/pull/78) ### Removed From f1b71ef62f23f92507c20069450a17472e590220 Mon Sep 17 00:00:00 2001 From: yushiang Date: Tue, 5 Mar 2024 21:41:08 +0800 Subject: [PATCH 3/4] fix: decoration page runtime error --- apps/editors/decoration/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/editors/decoration/index.js b/apps/editors/decoration/index.js index 19e31f6..aeaa970 100644 --- a/apps/editors/decoration/index.js +++ b/apps/editors/decoration/index.js @@ -120,7 +120,7 @@ const Editor = ({ data }) => { }, []); useEffect(() => { - threeRef.current.cameraControls.setEnable(mode === MODE.SELECT); + threeRef.current?.cameraControls.setEnable(mode === MODE.SELECT); }, [mode]); const focusedMedia = media[focusedIndex]; From 35cb845c1a48ac675c81846fdc0c1b6fd42aa5a4 Mon Sep 17 00:00:00 2001 From: yushiang Date: Tue, 5 Mar 2024 21:45:45 +0800 Subject: [PATCH 4/4] doc: changelog 2.1.2. --- CHANGELOG.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8873a16..9326024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ The format is based on [Keep a Changelog](https://github.com/olivierlacan/keep-a ### Fixed +### Removed + +## [2.1.2] - 2024-03-05 + +### Added + +### Changed + +### Fixed + - Fix `decoration`, `viewer` pages runtime error. (https://github.com/yushiang-demo/pano-to-mesh/pull/78) ### Removed @@ -227,8 +237,9 @@ Codes without pull requests won't be recorded. ### Removed -[unreleased]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.1...HEAD -[2.1.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.0...v2.1.0 +[unreleased]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.2...HEAD +[2.1.2]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.1...v2.1.2 +[2.1.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.0...v2.1.1 [2.1.0]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.1...v2.1.0 [2.0.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.0...v2.0.1 [2.0.0]: https://github.com/yushiang-demo/PanoToMesh/compare/v1.4.1...v2.0.0