From a772df4a996365e66e7c37ffcaeb5a4ed0c75bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Sat, 1 Mar 2025 23:01:13 +0100 Subject: [PATCH] Fix: [Script] "type" std function might be redefined by scripts (#13686) --- bin/ai/compat_14.nut | 2 +- bin/game/compat_14.nut | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ai/compat_14.nut b/bin/ai/compat_14.nut index 8632f8523b..012a8d070c 100644 --- a/bin/ai/compat_14.nut +++ b/bin/ai/compat_14.nut @@ -12,7 +12,7 @@ AIBridge.GetBridgeID <- AIBridge.GetBridgeType; class AICompat14 { function Text(text) { - if (type(text) == "string") return text; + if (typeof text == "string") return text; return null; } } diff --git a/bin/game/compat_14.nut b/bin/game/compat_14.nut index d9849572c9..00efae0b65 100644 --- a/bin/game/compat_14.nut +++ b/bin/game/compat_14.nut @@ -12,8 +12,8 @@ GSBridge.GetBridgeID <- GSBridge.GetBridgeType; class GSCompat14 { function Text(text) { - if (type(text) == "string") return text; - if (type(text) == "instance" && text instanceof GSText) return text; + if (typeof text == "string") return text; + if (typeof text == "instance" && text instanceof GSText) return text; return null; } }