[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-4' - loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 7 17:56:18 UTC 2020
loleaflet/src/map/Clipboard.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 208d8a944906f35e7e1a0b3fdbaa077a8d44475d
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jul 7 09:52:04 2020 +0200
Commit: Aron Budea <aron.budea at collabora.com>
CommitDate: Tue Jul 7 19:55:59 2020 +0200
clipboard: avoid error when localStorage is not available
In some browsers with strange settings localStorage is
not available.
Change-Id: If9e5ebeb9701cc0a2b19c5946bcbc23f76a8c577
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98238
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
(cherry picked from commit ac7125b1ea4f451a4dfef0a7eed999e18ff0f51b)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98087
Reviewed-by: Aron Budea <aron.budea at collabora.com>
diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js
index 29bb77e67..160b664f4 100644
--- a/loleaflet/src/map/Clipboard.js
+++ b/loleaflet/src/map/Clipboard.js
@@ -786,10 +786,13 @@ L.Clipboard = L.Class.extend({
_userAlreadyWarned: function (warning) {
var itemKey = warning;
- if (!localStorage.getItem(itemKey)) {
- localStorage.setItem(itemKey, '1');
+ var storage = localStorage;
+ if (storage && !storage.getItem(itemKey)) {
+ storage.setItem(itemKey, '1');
return false;
- }
+ } else if (!storage)
+ return false;
+
return true;
},
More information about the Libreoffice-commits
mailing list