fix: make sure not use new feature.

This commit is contained in:
Ansolve 2023-12-30 00:12:56 +08:00
parent cf21db0d5a
commit dacf68d0b5
No known key found for this signature in database
GPG Key ID: 2F2873AC9538CC2D
1 changed files with 7 additions and 8 deletions

View File

@ -747,14 +747,13 @@ async function onWindowReady() {
var script = document.createElement('script');
script.src = 'cordova.js';
document.body.appendChild(script);
// @ts-ignore
const { promise, resolve } = Promise.withResolvers();
document.addEventListener('deviceready', async () => {
const { cordovaReady } = await import('./cordova.js');
await cordovaReady();
resolve()
});
await promise;
await new Promise((resolve) => {
document.addEventListener('deviceready', async () => {
const { cordovaReady } = await import('./cordova.js');
await cordovaReady();
resolve(void 0)
});
})
}
/*
if (_status.packLoaded) {