Skip to content

Commit c328b37

Browse files
authored
fix: lua error with new spec overrides (#12)
1 parent 71743be commit c328b37

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.releaserc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414
"preset": "conventionalcommits"
1515
}
1616
],
17-
[
18-
"@semantic-release/github",
19-
{
20-
"discussionCategoryName": "Announcements"
21-
}
22-
]
17+
"@semantic-release/github"
2318
],
2419
"preset": "conventionalcommits"
2520
}

Core.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ function DLP:EDIT_MODE_LAYOUTS_UPDATED(bucketedArgs)
173173
local type = G_DLP.L["LAYOUT_TYPE_DEVICE"]
174174
local specId = PlayerUtil.GetCurrentSpecID()
175175
if self.db.char.specs.overrides[specId] ~= nil then
176-
desired = self.db.char.specs[specId]
176+
desired = self.db.char.specs.overrides[specId]
177177
type = G_DLP.L["LAYOUT_TYPE_SPEC"]
178178
else
179179
self:Print(G_DLP.L["ERROR_LAYOUT_INVALID"])
180180
self.db.char.specs.overrides[specId] = SPEC_DEFAULT
181-
return
181+
desired = SPEC_DEFAULT
182182
end
183183
if desired == SPEC_DEFAULT then
184184
desired = self.db.global.presetIndexOnLogin
@@ -212,7 +212,6 @@ function DLP:PLAYER_SPECIALIZATION_CHANGED(eventName, unitTarget)
212212
local specId = PlayerUtil.GetCurrentSpecID()
213213
if self.db.char.specs.overrides[specId] == nil then
214214
self.db.char.specs.overrides[specId] = SPEC_DEFAULT
215-
return
216215
end
217216
layouts = EditModeManagerFrame:GetLayouts()
218217
local desired = self.db.char.specs.overrides[specId]

0 commit comments

Comments
 (0)