From 846514e09f69a6549164d3535a0fd3b937d59c14 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Wed, 8 Feb 2012 18:42:38 +0000 Subject: [PATCH] Actually delete properties instead of just setting them as undefined. --- run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.js b/run.js index 3d13cd2..7a523aa 100644 --- a/run.js +++ b/run.js @@ -56,12 +56,12 @@ DBot.prototype.reloadModules = function() { this.save(); var path = require.resolve('./snippets'); - require.cache[path] = undefined; + delete require.cache[path]; require('./snippets'); this.moduleNames.each(function(name) { var cacheKey = require.resolve('./modules/' + name); - require.cache[cacheKey] = undefined; // TODO: snippet to remove element properly + delete require.cache[cacheKey]; try { this.rawModules.push(require('./modules/' + name)); } catch(err) {