Quantcast

Merge pull request #34 from xandrcouk/master

Xruptor [07-26-16 - 01:55]
Merge pull request #34 from xandrcouk/master

FIX: GetAutoCompleteRealms() returning nothing
Filename
BagSync.lua
diff --git a/BagSync.lua b/BagSync.lua
index cca754d..96a125f 100644
--- a/BagSync.lua
+++ b/BagSync.lua
@@ -1125,7 +1125,9 @@ function BagSync:PLAYER_LOGIN()
 	playerClass = select(2, UnitClass("player"))
 	playerFaction = UnitFactionGroup("player")

-	for k, v in pairs(GetAutoCompleteRealms()) do
+	local autoCompleteRealms = GetAutoCompleteRealms() or { currentRealm }
+
+	for k, v in pairs(autoCompleteRealms) do
 		if v ~= currentRealm then
 			crossRealmNames[v] = true
 		end