Skip to content

Commit 7cba6dc

Browse files
authored
Merge pull request #4720 from storybooks/node-11-fix
Fix tests in node 11 by using `Array#sort` correctly
2 parents 4c757d0 + 0106721 commit 7cba6dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/info/src/components/Story.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ class Story extends Component {
350350
extract(children);
351351

352352
const array = Array.from(types.keys());
353-
array.sort((a, b) => getName(a) > getName(b));
353+
array.sort((a, b) => (getName(a) > getName(b) ? 1 : -1));
354354

355355
propTables = array.map((type, i) => (
356356
// eslint-disable-next-line react/no-array-index-key

0 commit comments

Comments
 (0)