aboutsummaryrefslogtreecommitdiffstats
path: root/lib/providermanager.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/providermanager.js')
-rw-r--r--lib/providermanager.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/providermanager.js b/lib/providermanager.js
index 83e11605b..a00f444a1 100644
--- a/lib/providermanager.js
+++ b/lib/providermanager.js
@@ -49,12 +49,12 @@ var ProviderManager = function() {
result = JSON.parse(result);
- // dont call the callback if result is an error, empty array or false
- if (result.error || (result.result instanceof Array ? result.result.length === 0 : !result.result)) {
+ // dont call the callback if result is not an array, or empty one
+ if (result.error || !(result.result instanceof Array) || result.result.length === 0) {
return;
}
- data.callback(result);
+ data.callback(result.result);
});
}
setTimeout(poll, 12000);