From 215ccb87a1aeeea20dfd0b332434a9a6a2562abc Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Wed, 15 May 2024 22:07:01 +0530 Subject: [PATCH] fix(module): return the actual env in sandboxGetfenv --- modules/sandbox.luau | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/sandbox.luau b/modules/sandbox.luau index b5e8afa..36e9d53 100644 --- a/modules/sandbox.luau +++ b/modules/sandbox.luau @@ -80,7 +80,11 @@ local function discoverAndReadScript(filePath: string): string end local function sandboxGetfenv(): {} - return table.freeze(SANDBOXED_ENV) + if table.isfrozen(SANDBOXED_ENV) then + return SANDBOXED_ENV.environment + end + + return {} end local function sandboxSetfenv(env: {}): never