Skip to content

Commit 38ac178

Browse files
committed
fix(GameMap): Resolve scope issue in moveField
1 parent ae46aec commit 38ac178

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

game/GameMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,8 @@ class GameMap {
795795
}
796796

797797
async moveField(destInfo) {
798+
const rmdFileName = typeof destInfo === 'string' ? destInfo : destInfo.string;
799+
798800
if (typeof destInfo === 'string' && rmdFileName === this.currentRmdFileName) return;
799801

800802
const isInnerPortal = destInfo?.gateShape === GAS_INNER_PORTAL;
@@ -810,8 +812,6 @@ class GameMap {
810812
RedStone.miniMap.reset();
811813
this.reset();
812814

813-
const rmdFileName = typeof destInfo === 'string' ? destInfo : destInfo.string;
814-
815815
await this.loadMap(rmdFileName, gateSerial);
816816
await this.init();
817817
RedStone.mainCanvas.mainContainer.removeChild(RedStone.player.container);

0 commit comments

Comments
 (0)