Strip unicode null from deviceNames

Not sure how or why but sometimes deviceNames arrive on the server
containing a null char.

// FREEBIE
This commit is contained in:
lilia 2016-09-01 13:15:04 -07:00
parent 43ca465eb9
commit 9deaa95e8c

View file

@ -66,6 +66,7 @@
this.$('#sync').click(function(e) {
e.stopPropagation();
var name = this.$('#device-name').val();
name = name.replace(/\0/g,''); // strip unicode null
if (name.trim().length === 0) {
this.$('#device-name').focus();
return;