changes to make whisper working

This commit is contained in:
Marek Kotewicz
2014-10-29 17:14:59 +01:00
parent 31c6159019
commit cb607b4911
2 changed files with 9 additions and 5 deletions

View File

@@ -48,7 +48,7 @@
var self = this;
this.sendRequest(payload, function (request) {
var parsed = JSON.parse(request.responseText);
if (!parsed.result) {
if (parsed.result instanceof Array ? parsed.result.length === 0 : !parsed.result) {
return;
}
self.handlers.forEach(function (handler) {