bbbtech / storybook-formik

A storybook decorator that allows you to use components in your stories that rely on Formik context.
53 stars 17 forks source link

Issue from decorator throwing an error #57

Open matt-loves-tacos opened 2 years ago

matt-loves-tacos commented 2 years ago

Has anyone seen this error before? We have some decorators that are throwing this error when we run our storybook tests and trying to determine the cause.

TypeError: Cannot convert undefined or null to object at keys (<anonymous>) at wrapper (/home/circleci/project/node_modules/storybook-formik/src/index.tsx:22:21) at /home/circleci/project/node_modules/@storybook/addons/dist/make-decorator.js:37:14 at /home/circleci/project/node_modules/@storybook/addons/dist/make-decorator.js:51:26 at /home/circleci/project/node_modules/@storybook/addons/dist/hooks.js:241:21 at /home/circleci/project/node_modules/@storybook/client-api/dist/client_api.js:135:14 at storyFn (/home/circleci/project/node_modules/@storybook/client-api/dist/client_api.js:136:16) at CssBaselineDecorator (/home/circleci/project/.storybook/decorators/CssBaselineDecorator.jsx:8:17) at /home/circleci/project/node_modules/@storybook/addons/dist/hooks.js:241:21 at /home/circleci/project/node_modules/@storybook/client-api/dist/client_api.js:135:14

These are our storybook dependencies:

"storybook-formik": "^2.5.0", "@storybook/addon-a11y": "^5.2.8", "@storybook/addon-actions": "^5.2.8", "@storybook/addon-backgrounds": "^5.3.6", "@storybook/addon-docs": "^5.2.8", "@storybook/addon-storyshots": "^5.2.8", "@storybook/addon-storysource": "^5.2.8", "@storybook/addon-viewport": "^5.3.3", "@storybook/react": "5.3",