mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix issue with loading new version plugins in the web app
Attempt to fix plugin settings deleting in rare cases
This commit is contained in:
parent
b7ce88e2da
commit
7157dcad89
@ -72,6 +72,10 @@ class Setting {
|
||||
if (!this.icon) this.icon = 'settings';
|
||||
}
|
||||
this.keybind_label = tl('data.setting');
|
||||
|
||||
if (Blockbench.setup_successful) {
|
||||
Settings.saveLocalStorages();
|
||||
}
|
||||
}
|
||||
get value() {
|
||||
let profile = SettingsProfile.all.find(profile => profile.isActive() && profile.settings[this.id] !== undefined);
|
||||
|
@ -99,7 +99,11 @@ class Plugin {
|
||||
var scope = this;
|
||||
Plugins.registered[this.id] = this;
|
||||
return await new Promise((resolve, reject) => {
|
||||
$.getScript(Plugins.path + scope.id + '.js', () => {
|
||||
let path = Plugins.path + scope.id + '.js';
|
||||
if (!isApp && this.new_repository_format) {
|
||||
path = `${Plugins.path}${scope.id}/${scope.id}.js`;
|
||||
}
|
||||
$.getScript(path, () => {
|
||||
if (cb) cb.bind(scope)()
|
||||
scope.bindGlobalData(first)
|
||||
if (first && scope.oninstall) {
|
||||
|
Loading…
Reference in New Issue
Block a user