Skip to content

Commit

Permalink
Keep kind order
Browse files Browse the repository at this point in the history
  • Loading branch information
thani-sh committed Sep 27, 2016
1 parent 6de3937 commit 31b7f83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/preview/story_store.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default class StoryStore {
getStoryKinds() {
return Object.keys(this._data)
.map(key => this._data[key])
.filter(kind => Object.keys(kind.stories).length > 0)
.sort((info1, info2) => (info1.index - info2.index))
.map(info => info.kind);
}
Expand Down Expand Up @@ -59,7 +60,7 @@ export default class StoryStore {
}

removeStoryKind(kind) {
delete this._data[kind];
this._data[kind].stories = {};
}

hasStoryKind(kind) {
Expand Down

0 comments on commit 31b7f83

Please sign in to comment.