Permalink
Browse files

test empty response

  • Loading branch information...
1 parent 40ea727 commit 3878dd7b80912ab990fec91daea789fe6cfb54dc @Fedik committed Aug 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 mooOptionTree.js
View
@@ -216,12 +216,12 @@ var mooOptionTree = new Class({
}).send();
this.request.addEvent('success', function(response) {
- if (response) {
- //save answer
+ if (Object.keys(response).length) {
+ // save answer
this.tree[id] = {};
this.tree[id] = response;
}
- //hide loadin animation
+ // hide loadin animation
if (loading_image) {
loading_image.dispose();
}

0 comments on commit 3878dd7

Please sign in to comment.