From 336447837fb513186b7b3865ce205de0c2a83a85 Mon Sep 17 00:00:00 2001 From: johndoknjas Date: Fri, 31 Jan 2025 19:52:34 -0800 Subject: [PATCH] Move `setOrientation` call within if stmt. --- ui/editor/src/ctrl.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/editor/src/ctrl.ts b/ui/editor/src/ctrl.ts index 415ca93de927..2db44d2cffb9 100644 --- a/ui/editor/src/ctrl.ts +++ b/ui/editor/src/ctrl.ts @@ -51,8 +51,10 @@ export default class EditorCtrl { cfg.endgamePositions.forEach(p => (p.epd = p.fen.split(' ').splice(0, 4).join(' '))); site.mousetrap.bind('f', () => { - if (this.chessground) this.chessground.toggleOrientation(); - if (this.options.orientation) this.setOrientation(opposite(this.options.orientation)); + if (this.chessground) { + this.chessground.toggleOrientation(); + if (this.options.orientation) this.setOrientation(opposite(this.options.orientation)); + } this.onChange(); });