added check for undefined, null empty string

v1.18.x
Baris Soner Usakli 11 years ago
parent bbac361670
commit 9879f645f6

@ -185,12 +185,16 @@
},
toISOString: function(timestamp) {
if(!timestamp) {
return '';
}
try {
return new Date(parseInt(timestamp, 10)).toISOString();
} catch(e){
console.log(e.message);
console.log(timestamp, e.stack);
}
return new Date(parseInt(0, 10)).toISOString();
return '';
}
};

Loading…
Cancel
Save