From d425822d6b20e36b264733cc5597ed0ba3b436d6 Mon Sep 17 00:00:00 2001 From: EmeraldBlock Date: Wed, 21 Oct 2020 18:54:40 -0500 Subject: [PATCH] Fix trying to clear nonexistent hub rendering cache --- src/js/game/hud/parts/sandbox_controller.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/js/game/hud/parts/sandbox_controller.js b/src/js/game/hud/parts/sandbox_controller.js index 6f4a8f54..1e403961 100644 --- a/src/js/game/hud/parts/sandbox_controller.js +++ b/src/js/game/hud/parts/sandbox_controller.js @@ -172,7 +172,7 @@ export class HUDSandboxController extends BaseHUDPart { } } - this.root.buffers.cache.get("hub").clear(); + this.root.buffers.cache.get("hub") && this.root.buffers.cache.get("hub").clear(); this.root.hud.parts.pinnedShapes.rerenderFull(); this.root.hud.signals.notification.dispatch( @@ -204,13 +204,12 @@ export class HUDSandboxController extends BaseHUDPart { } overrideLevel(shape) { - console.log(shape); const hubGoals = this.root.hubGoals; hubGoals.currentGoal.definition = this.root.shapeDefinitionMgr.getShapeFromShortKey(shape); hubGoals.storedShapes[hubGoals.currentGoal.definition.getHash()] = 0; - this.root.buffers.cache.get("hub").clear(); + this.root.buffers.cache.get("hub") && this.root.buffers.cache.get("hub").clear(); this.root.hud.parts.pinnedShapes.rerenderFull(); this.root.hud.signals.notification.dispatch(