Fix Dialog error message when bad props are passed

This commit is contained in:
Ryan Gossiaux
2021-12-26 11:48:13 -08:00
parent a033e8ca4a
commit 3801d35d0f

View File

@@ -84,11 +84,11 @@
: open;
// Validations
let hasOpen = open !== undefined || openClosedState !== null;
let hasOpen = open !== undefined || openClosedState !== undefined;
if (!hasOpen) {
throw new Error(
`You forgot to provide an \`open\` prop to the \`Dialog\`.`
`You forgot to provide an \`open\` prop to the \`Dialog\` component.`
);
}