Probable fix for an error

This commit is contained in:
Relintai 2016-05-06 15:46:51 +02:00
parent 44f8a819df
commit 0c908c4171

View File

@ -279,7 +279,6 @@ function Vect:SortCDs(which)
local db = Vect.db.profile; local db = Vect.db.profile;
local tmp = {}; local tmp = {};
--make the tmp table --make the tmp table
local i = 1; local i = 1;
for k, v in pairs(self.cds[self.targets[which]]) do for k, v in pairs(self.cds[self.targets[which]]) do
@ -296,6 +295,8 @@ function Vect:SortCDs(which)
i = i + 1; i = i + 1;
end end
if not tmp then return end;
if db[which]["sortOrder"] == "1" then --["1"] = "Ascending (CD left)", if db[which]["sortOrder"] == "1" then --["1"] = "Ascending (CD left)",
table.sort(tmp, function(a, b) return Vect:ComparerAscendingCDLeft(a, b) end); table.sort(tmp, function(a, b) return Vect:ComparerAscendingCDLeft(a, b) end);
elseif db[which]["sortOrder"] == "2" then --["2"] = "Descending (CD left)", elseif db[which]["sortOrder"] == "2" then --["2"] = "Descending (CD left)",