···1313 type DialogControlRefProps,
1414 type DialogOuterProps,
1515} from '#/components/Dialog/types'
1616+import {IS_DEV} from '#/env'
1617import {BottomSheetSnapPoint} from '../../../modules/bottom-sheet/src/BottomSheet.types'
17181819export const Context = createContext<DialogContextProps>({
···5051 id,
5152 ref: control,
5253 open: () => {
5353- control.current.open()
5454+ if (control.current) {
5555+ control.current.open()
5656+ } else {
5757+ if (IS_DEV) {
5858+ console.warn(
5959+ 'Attemped to open a dialog control that was not attached to a dialog!\n' +
6060+ 'Please ensure that the Dialog is mounted when calling open/close',
6161+ )
6262+ }
6363+ }
5464 },
5565 close: cb => {
5656- control.current.close(cb)
6666+ if (control.current) {
6767+ control.current.close(cb)
6868+ } else {
6969+ if (IS_DEV) {
7070+ console.warn(
7171+ 'Attemped to close a dialog control that was not attached to a dialog!\n' +
7272+ 'Please ensure that the Dialog is mounted when calling open/close',
7373+ )
7474+ }
7575+ }
5776 },
5877 }),
5978 [id, control],