Skip to content

Commit

Permalink
Fixup for preferences
Browse files Browse the repository at this point in the history
Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
  • Loading branch information
vitaliy-guliy committed Oct 29, 2020
1 parent 5927c71 commit 24a52b8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/core/src/browser/shell/shell-layout-restorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,18 @@ export class ShellLayoutRestorer implements CommandContribution {
private convertToDescription(widget: Widget): WidgetDescription | undefined {
const desc = this.widgetManager.getDescription(widget);
if (desc) {
let innerState = undefined;
if (StatefulWidget.is(widget)) {
innerState = widget.storeState();
const innerState = widget.storeState();
return innerState ? {
constructionOptions: desc,
innerWidgetState: this.deflate(innerState)
} : undefined;
} else {
return {
constructionOptions: desc,
innerWidgetState: undefined
};
}
return innerState ? {
constructionOptions: desc,
innerWidgetState: innerState && this.deflate(innerState)
} : undefined;
}
}

Expand Down

0 comments on commit 24a52b8

Please sign in to comment.