Tolerate missing WOPI parameters.

Change-Id: Ic938b835aadeb299e06682b2f384db323eca0a91
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92699
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
This commit is contained in:
Michael Meeks 2020-04-22 14:48:18 +01:00
parent b6c354cbed
commit ce54304a34

View file

@ -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;
}