Fix import of presets with spaces
This commit is contained in:
parent
59af85ce1c
commit
4f458ce93a
|
@ -382,8 +382,10 @@ jQuery(async () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = file.name.replace('.json', '').replace('.settings', '');
|
const fileName = file.name.replace('.json', '').replace('.settings', '');
|
||||||
const data = await parseJsonFile(file);
|
const data = await parseJsonFile(file);
|
||||||
|
const name = data?.name ?? fileName;
|
||||||
|
data['name'] = name;
|
||||||
|
|
||||||
await presetManager.savePreset(name, data);
|
await presetManager.savePreset(name, data);
|
||||||
toastr.success('Preset imported');
|
toastr.success('Preset imported');
|
||||||
|
|
Loading…
Reference in New Issue