Quantcast

Fix an error when invalid zone supplied

James Whitehead II [01-24-11 - 23:16]
Fix an error when invalid zone supplied
Filename
TomTom.lua
diff --git a/TomTom.lua b/TomTom.lua
index 4060559..a28983d 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -1129,6 +1129,7 @@ SlashCmdList["TOMTOM_WAY"] = function(msg)
             elseif #matches == 0 then
                 local msg = string.format(L["Could not find any matches for zone %s."], zone)
                 ChatFrame1:AddMessage(msg)
+                return
             end

             local zoneName = matches[1]
@@ -1190,6 +1191,7 @@ SlashCmdList["TOMTOM_WAY"] = function(msg)
         elseif #matches == 0 then
             local msg = string.format(L["Could not find any matches for zone %s."], zone)
             ChatFrame1:AddMessage(msg)
+            return
         end

 		-- There was only one match, so proceed