ソースを参照

fix: bug where disableIcons would throw error if there was no icon on screen

lairaalmas 1 年間 前
コミット
81bb1fdb6a
1 ファイル変更4 行追加2 行削除
  1. 4 2
      js/globals/globals_functions.js

+ 4 - 2
js/globals/globals_functions.js

@@ -66,8 +66,10 @@ const navigation = {
   },
 
   disableIcon: (icon) => {
-    icon.alpha = 0;
-    icon.isDisabled = true;
+    if (icon) {
+      icon.alpha = 0;
+      icon.isDisabled = true;
+    }
   },
 
   onInputDown: (x, y) => {