Skip to content

Commit

Permalink
[WebUI IntelliHome#7] Return of empty array if RPC answer is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
skullbocks committed Aug 19, 2014
1 parent d4524a2 commit 726017f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/IntelliHome/WebUI/Plugin/RPC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ sub register {
print 'Error : ', $res->error_message . "\n";
}
else {
return map { $_ = thaw($_); $_ } @{ $res->result };
ref $res->result eq "ARRAY"
? map { $_ = thaw($_); $_ } @{ $res->result }
: ();
}
}
else {
Expand Down

0 comments on commit 726017f

Please sign in to comment.