Quantcast

Use wipe to unset parses.

Peter Eliasson [08-07-16 - 16:15]
Use wipe to unset parses.
Filename
src/options.lua
diff --git a/src/options.lua b/src/options.lua
index 8a25bf8..fbd1b96 100644
--- a/src/options.lua
+++ b/src/options.lua
@@ -9,6 +9,7 @@ local addonName, addonTable = ...

 -- Cached globals
 local format = format;
+local wipe = wipe;

 -- Non-cached globals (for mikk's FindGlobals script)
 -- GLOBALS: LibStub, InterfaceOptionsFrame_OpenToCategory
@@ -56,8 +57,7 @@ local function createOptionsTable()
 								.. ' This cannot be undone!';
 						end,
 						func = function()
-							local highscoreDb = addon.highscore:GetDB();
-							highscoreDb = nil;
+							wipe(addon.highscore:GetDB());
 							addon:SetupDatabase();
 							addon:Print("All parses have been removed.");
 						end,