From 9a70c94dc1a060452d7fa7870a669fdbc458287b Mon Sep 17 00:00:00 2001 From: Filipp Riabchun Date: Mon, 5 Nov 2018 20:29:04 +0400 Subject: [PATCH] Merge pull request #4720 from storybooks/node-11-fix Fix tests in node 11 by using `Array#sort` correctly --- addons/info/src/components/Story.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index cf3bed071a79..5d1fccafc56c 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -350,7 +350,7 @@ class Story extends Component { extract(children); const array = Array.from(types.keys()); - array.sort((a, b) => getName(a) > getName(b)); + array.sort((a, b) => (getName(a) > getName(b) ? 1 : -1)); propTables = array.map((type, i) => ( // eslint-disable-next-line react/no-array-index-key