From a22d9d2dc5e7f7c8a7c4a699eac86c0b69c11918 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Wed, 15 May 2024 22:07:25 +0530 Subject: [PATCH] docs: update sandbox snippet in docs --- pages/getting-started/5-security.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/getting-started/5-security.mdx b/pages/getting-started/5-security.mdx index ca52bfe..f7a3ab0 100644 --- a/pages/getting-started/5-security.mdx +++ b/pages/getting-started/5-security.mdx @@ -105,7 +105,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