loleaflet/src/layer/marker/Annotation.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit ad5a5e086d2979817a8558bc57e071b03a438aa1 Author: Jan Holesovsky <ke...@collabora.com> Date: Wed Apr 26 19:15:22 2017 +0200 comments: If we fail to parse the date, show it verbatim. Change-Id: Iefee7057b3c192c33d49891dd7ef5835d39d1cb8 diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index b5d8fbae..34b00ea1 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -280,15 +280,15 @@ L.Annotation = L.Layer.extend({ }, _updateContent: function () { - if (!(this._data.dateTime instanceof Date)) { - this._data.dateTime = new Date(this._data.dateTime.replace(/,.*/, 'Z')); - } var linkedText = Autolinker.link(this._data.text); this._contentText.innerHTML = linkedText; // Original unlinked text this._contentText.origText = this._nodeModifyText.innerHTML = this._data.text; this._contentAuthor.innerHTML = this._data.author; - this._contentDate.innerHTML = this._data.dateTime.toDateString(); + + var d = new Date(this._data.dateTime.replace(/,.*/, 'Z')); + this._contentDate.innerHTML = isNaN(d.getTime())? this._data.dateTime: d.toDateString(); + if (this._data.trackchange) { this._captionText.innerHTML = this._data.description; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits