Fix Uncaught TypeError: Cannot read property 'length' of undefined

Fix Uncaught TypeError: Cannot read property 'length' of undefined
This commit is contained in:
Maxwell 2013-11-11 13:40:55 -02:00
parent b1e1e0c659
commit bab448fc9e

View file

@ -83,7 +83,7 @@ wn.UserProperties = Class.extend({
render: function(prop_list) {
this.body.empty();
this.prop_list = prop_list;
if(!prop_list.length) {
if(!prop_list || !prop_list.length) {
this.body.html("<div class='alert alert-info'>"+wn._("No User Properties found.")+"</div>");
} else {
this.show_property_table();
@ -231,4 +231,4 @@ wn.UserProperties = Class.extend({
});
}
})
})