Skip to content

Commit

Permalink
fix(Flow): Add the default data for the Flow component
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoli committed Sep 6, 2018
1 parent 3bb84ba commit a73394c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/components/Flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ class Flow extends Page {
return `${FLOW_CONTAINER}_${editorId}`;
}

config = {
data: {
nodes: [],
edges: [],
},
}

initPage() {
const { editor } = this.context;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Page extends BaseComponent {
initPage() {}

readData() {
const { data } = this.props;
const { data } = this.config;

if (data) {
this.page.read(data);
Expand Down

0 comments on commit a73394c

Please sign in to comment.