Skip to content

Commit 2836d91

Browse files
walterbenderWalter Bender
andauthored
Local planet (#4734)
* fix typo * catch error when LocalPlanet is null --------- Co-authored-by: Walter Bender <[email protected]>
1 parent 0bc2f88 commit 2836d91

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

planet/js/Planet.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ class Planet {
5555
};
5656

5757
open(image) {
58-
this.LocalPlanet.setCurrentProjectImage(image);
59-
this.LocalPlanet.updateProjects();
60-
this.oldCurrentProjectID = this.ProjectStorage.getCurrentProjectID();
58+
if (this.LocalPlanet === null) {
59+
console.log("Local Planet unavailable");
60+
} else {
61+
this.LocalPlanet.setCurrentProjectImage(image);
62+
this.LocalPlanet.updateProjects();
63+
this.oldCurrentProjectID = this.ProjectStorage.getCurrentProjectID();
64+
}
6165
};
6266

6367
saveLocally(data, image) {

planet/js/ProjectStorage.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)