Quantcast

Should work now

Darthpred [08-07-16 - 12:40]
Should work now
Filename
ElvUI_SLE/skins/blizzard/merchantList.lua
diff --git a/ElvUI_SLE/skins/blizzard/merchantList.lua b/ElvUI_SLE/skins/blizzard/merchantList.lua
index 4633b3a..08aba52 100644
--- a/ElvUI_SLE/skins/blizzard/merchantList.lua
+++ b/ElvUI_SLE/skins/blizzard/merchantList.lua
@@ -111,13 +111,13 @@ local locale = {
 		REQUIRES = "需要(.+)",
 	},
 };
-local REQUIRES_LEVEL = locale[GetLocale()].REQUIRES_LEVEL
-local LEVEL = locale[GetLocale()].LEVEL
-local REQUIRES_REPUTATION = locale[GetLocale()].REQUIRES_REPUTATION
-local REQUIRES_REPUTATION_NAME = locale[GetLocale()].REQUIRES_REPUTATION_NAME
-local REQUIRES_SKILL = locale[GetLocale()].REQUIRES_SKILL
+local REQUIRES_LEVEL = locale[GetLocale()] and locale[GetLocale()].REQUIRES_LEVEL or ""
+local LEVEL = locale[GetLocale()] and locale[GetLocale()].LEVEL or ""
+local REQUIRES_REPUTATION = locale[GetLocale()] and locale[GetLocale()].REQUIRES_REPUTATION or ""
+local REQUIRES_REPUTATION_NAME = locale[GetLocale()] and locale[GetLocale()].REQUIRES_REPUTATION_NAME or ""
+local REQUIRES_SKILL = locale[GetLocale()] and locale[GetLocale()].REQUIRES_SKILL or ""
 local SKILL = "%1$s (%2$d)"
-local REQUIRES = locale[GetLocale()].REQUIRES
+local REQUIRES = locale[GetLocale()] and locale[GetLocale()].REQUIRES or ""

 local function Item_OnClick(self)
 	HandleModifiedItemClick(self.itemLink);
@@ -731,6 +731,9 @@ local function MerchantListSkinInit()
 		delete[i]:Hide()
 		delete[i].Show = function() end;
 	end
+	if not locale[GetLocale()] then
+		SLE:ErrorPrint("Your locale is unavailable to use with merchant style selected. Please, contact S&L authors.")
+	end
 end

 hooksecurefunc(S, "Initialize", MerchantListSkinInit)
\ No newline at end of file