From 73416dd45c1629ea2b6aba96eb4cef5df0370651 Mon Sep 17 00:00:00 2001 From: OttoHatt Date: Tue, 17 Jan 2023 23:16:00 +0000 Subject: [PATCH] fix: 'Promise.isPromise' checks metatable over reading ClassName --- src/promise/src/Shared/Promise.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/promise/src/Shared/Promise.lua b/src/promise/src/Shared/Promise.lua index 52fb6fc514..d38f9bd23d 100644 --- a/src/promise/src/Shared/Promise.lua +++ b/src/promise/src/Shared/Promise.lua @@ -22,7 +22,7 @@ Promise.__index = Promise @return boolean ]=] function Promise.isPromise(value) - return type(value) == "table" and value.ClassName == "Promise" + return type(value) == "table" and getmetatable(value) == Promise end --[=[