diff options
author | Sebastian <sebasjm@gmail.com> | 2022-01-25 09:26:12 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-01-25 10:29:40 -0300 |
commit | a06f7f7cbbbcbe5c3d34fc534c0fb681a009b0fe (patch) | |
tree | 9fd553befff20f668a074548915a21f0a3b445c7 /packages/anastasis-webui/.storybook/preview.js | |
parent | a51abcffb04e29880170fb3aac550e5dc06e01d0 (diff) | |
download | wallet-core-a06f7f7cbbbcbe5c3d34fc534c0fb681a009b0fe.tar.xz |
-fix: autocomplete check
Diffstat (limited to 'packages/anastasis-webui/.storybook/preview.js')
-rw-r--r-- | packages/anastasis-webui/.storybook/preview.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/anastasis-webui/.storybook/preview.js b/packages/anastasis-webui/.storybook/preview.js index 9ab4d9404..4b61856ef 100644 --- a/packages/anastasis-webui/.storybook/preview.js +++ b/packages/anastasis-webui/.storybook/preview.js @@ -23,8 +23,12 @@ export const parameters = { controls: { expanded: true }, options: { storySort: (a, b) => { - return (a[1].args.order ?? 0) - (b[1].args.order ?? 0) - // return a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, undefined, { numeric: true }) + if (!a || !a[1]) { + // https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort + console.log(a, b) + return (a?.args.order ?? 0) - (b?.args.order ?? 0) + } + return (a?.[1]?.args?.order ?? 0) - (b?.[1]?.args?.order ?? 0) } }, } |