[Libreoffice-commits] online.git: loleaflet/src
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 14 14:51:29 UTC 2020
loleaflet/src/map/handler/Map.FileInserter.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 6063cfc2266c512067abf2c9aec2e89dc35f70d1
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu May 14 14:50:29 2020 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu May 14 16:51:11 2020 +0200
Mend error substitution, jsstring.replace() doesn't replace in-place.
Change-Id: I9286779c6f25499aeb390f1c8346fc15574b8c8c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94217
Tested-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/loleaflet/src/map/handler/Map.FileInserter.js b/loleaflet/src/map/handler/Map.FileInserter.js
index 94e28e2aa..be1f4e922 100644
--- a/loleaflet/src/map/handler/Map.FileInserter.js
+++ b/loleaflet/src/map/handler/Map.FileInserter.js
@@ -96,7 +96,7 @@ L.Map.FileInserter = L.Handler.extend({
var errMsg = _('The file of type: %0 cannot be uploaded to server since the file has no name');
if (file.size === 0)
errMsg = _('The file of type: %0 cannot be uploaded to server since the file is empty');
- errMsg.replace('%0', file.type);
+ errMsg = errMsg.replace('%0', file.type);
map.fire('error', {msg: errMsg});
return;
}
@@ -141,7 +141,7 @@ L.Map.FileInserter = L.Handler.extend({
}
else {
var msg = _('Uploading file to server failed with status: %0');
- msg.replace('%0', xmlHttp.status);
+ msg = msg.replace('%0', xmlHttp.status);
map.fire('error', {msg: msg});
}
}
More information about the Libreoffice-commits
mailing list