Module:Constants: Difference between revisions

getModifiersDifference: Handle nil parameters gracefully
(getModifiersDifference: Initial implementation)
(getModifiersDifference: Handle nil parameters gracefully)
Line 973: Line 973:
local modDiff, modDiffBase = {}, {}
local modDiff, modDiffBase = {}, {}
local allMods = {
local allMods = {
{ ["mods"] = modifiersNew, ["mult"] = 1 },
{ ["mods"] = (modifiersNew or {}), ["mult"] = 1 },
{ ["mods"] = modifiersOld, ["mult"] = -1 }
{ ["mods"] = (modifiersOld or {}), ["mult"] = -1 }
}
}