Change constructor to return saved reference rather than new instance
Scott Yeskie [05-23-14 - 19:27]
Change constructor to return saved reference rather than new instance
diff --git a/lib/LibAddonMenu-1.0.lua b/lib/LibAddonMenu-1.0.lua
index ca3dde1..0eb4f82 100644
--- a/lib/LibAddonMenu-1.0.lua
+++ b/lib/LibAddonMenu-1.0.lua
@@ -41,7 +41,7 @@ function lamPanel.new(controlPanelID, controlPanelName)
if _G[controlPanelID] then
self.panelID = _G[controlPanelID]
- return self
+ return lam.panels[self.panelID]
end
ZO_OptionsWindow_AddUserPanel(controlPanelID, controlPanelName)