From f5b10f2a3884cc77dddc2656114a433e975dd9bc Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Mon, 4 Apr 2022 11:16:02 +0300 Subject: [PATCH] Getting this context for switch hotbar methods Signed-off-by: Alex Andreev --- src/common/hotbar-store.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/hotbar-store.ts b/src/common/hotbar-store.ts index 7de8ff7617..3126b13413 100644 --- a/src/common/hotbar-store.ts +++ b/src/common/hotbar-store.ts @@ -285,7 +285,7 @@ export class HotbarStore extends BaseStore { } } - switchToPrevious() { + switchToPrevious = () => { let index = this.activeHotbarIndex - 1; if (index < 0) { @@ -293,9 +293,9 @@ export class HotbarStore extends BaseStore { } this.setActiveHotbar(index); - } + }; - switchToNext() { + switchToNext = () => { let index = this.activeHotbarIndex + 1; if (index >= this.hotbars.length) { @@ -303,7 +303,7 @@ export class HotbarStore extends BaseStore { } this.setActiveHotbar(index); - } + }; /** * Checks if entity already pinned to the active hotbar