add fixup for importing older workspaces
This commit is contained in:
parent
6d887a43a7
commit
f217df382d
1 changed files with 6 additions and 0 deletions
|
|
@ -565,6 +565,12 @@ function settingsImport(data, ask) {
|
||||||
if (api.const.LOCAL) console.log('settings', Object.clone(settings));
|
if (api.const.LOCAL) console.log('settings', Object.clone(settings));
|
||||||
if (isWork) {
|
if (isWork) {
|
||||||
api.platform.clear();
|
api.platform.clear();
|
||||||
|
// really old workspaces encoded the types as strings
|
||||||
|
for (let work of data.work) {
|
||||||
|
if (work.type === "widget") {
|
||||||
|
work.type = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
kiri.codec.decode(data.work).forEach(widget => {
|
kiri.codec.decode(data.work).forEach(widget => {
|
||||||
api.platform.add(widget, 0, true, true);
|
api.platform.add(widget, 0, true, true);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue