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; } }