fix issue with storage
This commit is contained in:
@@ -165,10 +165,10 @@ export default {
|
||||
let loaded = false;
|
||||
return {
|
||||
name: 'storage',
|
||||
async langReady ({importLocale}) {
|
||||
async langReady ({lang}) {
|
||||
const storagePrompt = new URL(top.location).searchParams.get('storagePrompt');
|
||||
|
||||
const confirmSetStorage = await importLocale();
|
||||
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
||||
const {default: confirmSetStorage} = await import(`./locale/${lang}.js`);
|
||||
const {
|
||||
message, storagePrefsAndContent, storagePrefsOnly,
|
||||
storagePrefs, storageNoPrefsOrContent, storageNoPrefs,
|
||||
|
||||
@@ -18,8 +18,8 @@ For default config and extensions (and available options) available to
|
||||
`setConfig()`, see the file `docs/tutorials/ConfigOptions.md`
|
||||
*/
|
||||
|
||||
import 'core-js/stable/index.js';
|
||||
import 'regenerator-runtime/runtime.js';
|
||||
// import 'core-js/stable/index.js';
|
||||
// import 'regenerator-runtime/runtime.js';
|
||||
import svgEditor from './svgedit.js';
|
||||
|
||||
// URL OVERRIDE CONFIG
|
||||
|
||||
@@ -2834,13 +2834,19 @@ editor.init = function () {
|
||||
* @listens module:svgcanvas.SvgCanvas#event:extension_added
|
||||
* @returns {Promise<void>|void} Resolves to `undefined`
|
||||
*/
|
||||
const extAdded = function (win, ext) {
|
||||
const extAdded = async (win, ext) => {
|
||||
if (!ext) {
|
||||
return undefined;
|
||||
}
|
||||
let cbCalled = false;
|
||||
let resizeDone = false;
|
||||
|
||||
if (ext.langReady) {
|
||||
if (editor.langChanged) { // We check for this since the "lang" pref could have been set by storage
|
||||
const lang = editor.pref('lang');
|
||||
await ext.langReady({lang});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Clear resize timer if present and if not previously performed,
|
||||
* perform an icon resize.
|
||||
|
||||
Reference in New Issue
Block a user