fix: Fix storybook (no-changelog) (#4624)

since we migrated to vite, storybook/webpack aren't doing all the babel transforms. that's we we need to revert all optional-chaining and nullish-coalescing in design-system.

Hopefully this will be remedied after we move to vite for storybook.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-16 16:35:02 +01:00
committed by GitHub
parent 423ee81e33
commit 58630e43c0
8 changed files with 13 additions and 11 deletions

View File

@@ -128,10 +128,10 @@ const slots = useSlots();
const inputRef = ref<HTMLTextAreaElement | null>(null);
function getInputValidationError(): ReturnType<IValidator['validate']> {
const rules = props.validationRules ?? [];
const rules = props.validationRules || [];
const validators = {
...VALIDATORS,
...(props.validators ?? {}),
...(props.validators || {}),
} as { [key: string]: IValidator | RuleGroup };
if (props.required) {