Browse Source

fix harmless exception if value is null

master
Miguel Freitas 11 years ago
parent
commit
77ddb79d81
  1. 8
      twister_io.js

8
twister_io.js

@ -206,9 +206,11 @@ function getFullname( username, item ){
item.text(username); item.text(username);
getProfileResource( username, "fullname", undefined, getProfileResource( username, "fullname", undefined,
function(args, value) { function(args, value) {
value.replace(/^\s+|\s+$/g, ''); if( value ) {
if( value.length ) value.replace(/^\s+|\s+$/g, '');
args.item.text(value); if( value.length )
args.item.text(value);
}
}, {item: item} ); }, {item: item} );
} }

Loading…
Cancel
Save