Fix Dialog error message when bad props are passed
This commit is contained in:
@@ -84,11 +84,11 @@
|
|||||||
: open;
|
: open;
|
||||||
|
|
||||||
// Validations
|
// Validations
|
||||||
let hasOpen = open !== undefined || openClosedState !== null;
|
let hasOpen = open !== undefined || openClosedState !== undefined;
|
||||||
|
|
||||||
if (!hasOpen) {
|
if (!hasOpen) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`You forgot to provide an \`open\` prop to the \`Dialog\`.`
|
`You forgot to provide an \`open\` prop to the \`Dialog\` component.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user