From 35f0cec4596ac7d45b4f1f6c2b221a3d2f5ee503 Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Mon, 4 Sep 2023 22:23:48 -0700 Subject: [PATCH] Use has?get:key instead. --- game/game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/game.js b/game/game.js index 9a5f2dd38..3273561f7 100644 --- a/game/game.js +++ b/game/game.js @@ -53195,8 +53195,8 @@ //Get the card name length //获取此牌的字数 cardNameLength:card=>{ - const name=get.translation(get.name(card)); - return (lib.actualCardName.get(name)||name).length; + const actualCardName=lib.actualCardName,name=get.translation(get.name(card)); + return (actualCardName.has(name)?actualCardName.get(name):name).length; }, //Yingbian //应变