Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
better value checking
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrbrandt committed Jul 26, 2012
1 parent 5c72190 commit 1bce0f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 1bce0f3

Please sign in to comment.