[Libreoffice-commits] online.git: loleaflet/js

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 22 15:56:48 UTC 2020


 loleaflet/js/global.js |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit ce54304a348b9bd81e9b0eac514ec28ce60c537a
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Apr 22 14:48:18 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Wed Apr 22 17:56:30 2020 +0200

    Tolerate missing WOPI parameters.
    
    Change-Id: Ic938b835aadeb299e06682b2f384db323eca0a91
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92699
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 3022d94a3..a3b1fb49c 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -280,9 +280,11 @@
 		else if (global.accessHeader !== '') {
 			wopiParams = { 'access_header': global.accessHeader };
 		}
-		docParams = Object.keys(wopiParams).map(function(key) {
-			return encodeURIComponent(key) + '=' + encodeURIComponent(wopiParams[key]);
-		}).join('&');
+		if (wopiParams) {
+			docParams = Object.keys(wopiParams).map(function(key) {
+				return encodeURIComponent(key) + '=' + encodeURIComponent(wopiParams[key]);
+			}).join('&');
+		}
 	} else {
 		global.docURL = filePath;
 	}


More information about the Libreoffice-commits mailing list