From 0ea549a9c1d1383bc34ba6f7ffef8a62ddd325f8 Mon Sep 17 00:00:00 2001 From: Allen Faure Date: Wed, 26 Feb 2025 14:31:52 -0600 Subject: [PATCH] put the mixins in private exec_env too Fixes #5699 --- WeakAuras/AuraEnvironment.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index 64eccab9f3..335b569fef 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -523,9 +523,8 @@ local overridden = { WeakAuras = FakeWeakAuras } -local env_getglobal_custom -- WORKAROUND API which return Mixin'd values need those mixin "rawgettable" in caller's fenv #5071 -local exec_env_custom = setmetatable({ +local mixins = { ColorMixin = ColorMixin, Vector2DMixin = Vector2DMixin, Vector3DMixin = Vector3DMixin, @@ -534,7 +533,10 @@ local exec_env_custom = setmetatable({ TransmogPendingInfoMixin = TransmogPendingInfoMixin, TransmogLocationMixin = TransmogLocationMixin, PlayerLocationMixin = PlayerLocationMixin, -}, +} + +local env_getglobal_custom +local exec_env_custom = setmetatable(CopyTable(mixins), { __index = function(t, k) if k == "_G" then @@ -592,7 +594,7 @@ local PrivateForBuiltIn = { } local env_getglobal_builtin -local exec_env_builtin = setmetatable({}, +local exec_env_builtin = setmetatable(CopyTable(mixins), { __index = function(t, k) if k == "_G" then