Update JS dependency
This commit is contained in:
parent
ff7e598486
commit
c00077c12c
|
@ -157,12 +157,14 @@ const WebDAVNavigator = (url, options) => {
|
|||
};
|
||||
|
||||
const wopi_init = async () => {
|
||||
if (!wopi_discovery_url) {
|
||||
try {
|
||||
var d = await reqXML('GET', wopi_discovery_url);
|
||||
}
|
||||
catch (e) {
|
||||
reloadListing();
|
||||
return;
|
||||
}
|
||||
|
||||
var d = await reqXML('GET', wopi_discovery_url);
|
||||
|
||||
d.querySelectorAll('app').forEach(app => {
|
||||
var mime = (a = app.getAttribute('name').match(/^.*\/.*$/)) ? a[0] : null;
|
||||
wopi_mimes[mime] = {};
|
||||
|
@ -776,11 +778,10 @@ const WebDAVNavigator = (url, options) => {
|
|||
|
||||
document.querySelector('html').innerHTML = html_tpl;
|
||||
|
||||
if (wopi_discovery_url) {
|
||||
// Wait for WOPI discovery before creating the list
|
||||
if (wopi_discovery_url) {
|
||||
wopi_init();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
reloadListing();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue