loleaflet/src/layer/marker/Annotation.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 7784afada43ed47c7cce6c3dabdbdf3ddb7b129e Author: Jan Holesovsky <[email protected]> Date: Wed Apr 26 19:15:22 2017 +0200 comments: If we fail to parse the date, show it verbatim. Change-Id: Iefee7057b3c192c33d49891dd7ef5835d39d1cb8 Reviewed-on: https://gerrit.libreoffice.org/37000 Reviewed-by: Henry Castro <[email protected]> Tested-by: Henry Castro <[email protected]> diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 87fd29e9..a7e06a04 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -279,12 +279,11 @@ L.Annotation = L.Layer.extend({ }, _updateContent: function () { - if (!(this._data.dateTime instanceof Date)) { - this._data.dateTime = new Date(this._data.dateTime.replace(/,.*/, 'Z')); - } + var d = new Date(this._data.dateTime.replace(/,.*/, 'Z')); + this._contentText.innerHTML = this._nodeModifyText.innerHTML = this._data.text; this._contentAuthor.innerHTML = this._data.author; - this._contentDate.innerHTML = this._data.dateTime.toDateString(); + 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
