From c6e962c387b3b8fe37380819195da89c7ae307eb Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Fri, 6 Apr 2018 11:31:51 +0200 Subject: [PATCH] fix(split-pane): prerender --- core/src/components/split-pane/split-pane.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/components/split-pane/split-pane.tsx b/core/src/components/split-pane/split-pane.tsx index 3f22fed266..4f4a49947b 100644 --- a/core/src/components/split-pane/split-pane.tsx +++ b/core/src/components/split-pane/split-pane.tsx @@ -29,6 +29,8 @@ export class SplitPane { @Element() private el: HTMLElement; @State() visible = false; + @Prop({context: 'isServer'}) isServer: boolean; + /** * If true, the split pane will be hidden. Defaults to `false`. */ @@ -70,6 +72,9 @@ export class SplitPane { @Watch('when') protected whenChanged() { + if (this.isServer) { + return; + } this.rmL && this.rmL(); this.rmL = null; @@ -121,6 +126,9 @@ export class SplitPane { } private _styleChildren() { + if (this.isServer) { + return; + } const children = this.el.children; const nu = this.el.childElementCount; let foundMain = false;