Skip to content

Commit d9ea085

Browse files
Merge pull request #79 from yushiang-demo/dev
v2.1.2
2 parents d45dab8 + 35cb845 commit d9ea085

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

CHANGELOG.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ The format is based on [Keep a Changelog](https://github.com/olivierlacan/keep-a
1313

1414
### Removed
1515

16+
## [2.1.2] - 2024-03-05
17+
18+
### Added
19+
20+
### Changed
21+
22+
### Fixed
23+
24+
- Fix `decoration`, `viewer` pages runtime error. (https://github.com/yushiang-demo/pano-to-mesh/pull/78)
25+
26+
### Removed
27+
1628
## [2.1.1] - 2024-03-05
1729

1830
### Added
@@ -225,8 +237,9 @@ Codes without pull requests won't be recorded.
225237

226238
### Removed
227239

228-
[unreleased]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.1...HEAD
229-
[2.1.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.0...v2.1.0
240+
[unreleased]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.2...HEAD
241+
[2.1.2]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.1...v2.1.2
242+
[2.1.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.1.0...v2.1.1
230243
[2.1.0]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.1...v2.1.0
231244
[2.0.1]: https://github.com/yushiang-demo/PanoToMesh/compare/v2.0.0...v2.0.1
232245
[2.0.0]: https://github.com/yushiang-demo/PanoToMesh/compare/v1.4.1...v2.0.0

apps/editors/decoration/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const Editor = ({ data }) => {
120120
}, []);
121121

122122
useEffect(() => {
123-
threeRef.current.cameraControls.setEnable(mode === MODE.SELECT);
123+
threeRef.current?.cameraControls.setEnable(mode === MODE.SELECT);
124124
}, [mode]);
125125

126126
const focusedMedia = media[focusedIndex];
@@ -153,6 +153,8 @@ const Editor = ({ data }) => {
153153
[focusedIndex]
154154
);
155155

156+
if (!panorama) return null;
157+
156158
return (
157159
<>
158160
<ThreeCanvas dev={dev} ref={threeRef} {...eventHandlers}>

apps/viewer.js

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ const Viewer = ({ data }) => {
114114
);
115115
});
116116

117+
if (!panorama) return null;
118+
117119
return (
118120
<>
119121
<ThreeCanvas dev={dev} ref={threeRef} {...eventsHandlers}>

0 commit comments

Comments
 (0)