From 1bce0f33cd36b02b269e056b90be376da6e8e5e3 Mon Sep 17 00:00:00 2001 From: Joel Brandt Date: Thu, 26 Jul 2012 15:40:58 -0700 Subject: [PATCH] better value checking --- src/LiveDevelopment/LiveDevelopment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LiveDevelopment/LiveDevelopment.js b/src/LiveDevelopment/LiveDevelopment.js index a66adb60d35..b25790d4d29 100644 --- a/src/LiveDevelopment/LiveDevelopment.js +++ b/src/LiveDevelopment/LiveDevelopment.js @@ -243,7 +243,7 @@ define(function LiveDevelopment(require, exports, module) { function loadAgents() { var name, promises = []; for (name in _enabledAgentNames) { - if (_enabledAgentNames.hasOwnProperty(name) && agents.hasOwnProperty(name) && agents[name].load) { + if (_enabledAgentNames.hasOwnProperty(name) && agents[name].load) { promises.push(agents[name].load()); _loadedAgentNames.push(name); } @@ -257,7 +257,7 @@ define(function LiveDevelopment(require, exports, module) { * @param {string} name of agent to enable */ function enableAgent(name) { - if (!_enabledAgentNames.hasOwnProperty(name)) { + if (agents.hasOwnProperty(name) && !_enabledAgentNames.hasOwnProperty(name)) { _enabledAgentNames[name] = true; } }