Commit 5797b16c authored by Vladimir Baranov's avatar Vladimir Baranov

rref #5392. Fix messages withot timestamp processing

parent bbc419e9
...@@ -53,9 +53,14 @@ angular.module('ulakbus.messaging', ['ui.bootstrap']) ...@@ -53,9 +53,14 @@ angular.module('ulakbus.messaging', ['ui.bootstrap'])
// prepare message to show in UI // prepare message to show in UI
msg.prepareMessage = function(message){ msg.prepareMessage = function(message){
if (!message.timestamp){
message.moment = Moment();
console.error("NO TS: ", message);
} else {
var ts = message.timestamp.replace(/\.0+Z$/, ""); var ts = message.timestamp.replace(/\.0+Z$/, "");
// FIXME: process timezone properly // FIXME: process timezone properly
message.moment = Moment(ts); message.moment = Moment(ts);
}
return message; return message;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment