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