Skip to content

Commit 47d8b50

Browse files
authored
Fix error on non-sod classic era (fixes #2)
1 parent 02c8364 commit 47d8b50

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

UnifiedProfileManager.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ local AceDB = LibStub('AceDB-3.0');
44
local AceDBOptions = LibStub('AceDBOptions-3.0');
55
local AceConfig = LibStub('AceConfig-3.0');
66
local AceConfigDialog = LibStub('AceConfigDialog-3.0');
7-
local LibDualSpec = LibStub('LibDualSpec-1.0');
7+
-- LibDualSpec does not load on non-SoD classic era
8+
local LibDualSpec = LibStub('LibDualSpec-1.0', true);
89

910
local function SortAddons(name1, name2)
1011
return strcmputf8i(StripHyperlinks(name1), StripHyperlinks(name2)) < 0;
@@ -444,7 +445,7 @@ end
444445
function UPM:GetAceDBOptionsTable(db)
445446
local options = DeepCopyTable(AceDBOptions:GetOptionsTable(db), db);
446447

447-
local isLibDualSpec = LibDualSpec.registry[db] and true or false;
448+
local isLibDualSpec = LibDualSpec and LibDualSpec.registry[db] and true or false;
448449
if isLibDualSpec then
449450
LibDualSpec:EnhanceOptions(options, db);
450451
end

0 commit comments

Comments
 (0)