Skip to content

Commit 33831fc

Browse files
committed
Fix an error opening settings in combat
1 parent 6b4c322 commit 33831fc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

NoAutoclose.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,13 @@ function ns:initOptions()
484484

485485
SLASH_NOAUTOCLOSE1 = '/noautoclose';
486486
SLASH_NOAUTOCLOSE2 = '/nac';
487-
SlashCmdList['NOAUTOCLOSE'] = function() Settings.OpenToCategory(category:GetID()); end;
487+
SlashCmdList['NOAUTOCLOSE'] = function()
488+
if C_SettingsUtil and C_SettingsUtil.OpenSettingsPanel and InCombatLockdown() then
489+
print("Cannot open the settings in combat")
490+
return;
491+
end
492+
Settings.OpenToCategory(category:GetID());
493+
end;
488494
end
489495

490496
function ns:GetMoverFrame(onMoveCallback)

0 commit comments

Comments
 (0)