diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx index 74cdf04e32..8d36d75cda 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx @@ -17,16 +17,16 @@ const ModalWrapper = (props: ModalWrapperProps) => { onOkFn() } else { // @ts-ignore: Object is possibly 'null'. - (props.resolve) ? props.resolve(ref.current.value) : props.okFn(ref.current.value) + (props.okFn) ? props.okFn(ref.current.value) : props.resolve(ref.current.value) } } const onOkFn = async () => { - (props.resolve) ? props.resolve(true) : props.okFn() + (props.okFn) ? props.okFn() : props.resolve(true) } const onCancelFn = async () => { - (props.resolve) ? props.resolve(false) : props.cancelFn() + (props.cancelFn) ? props.cancelFn() : props.resolve(false) } const createModalMessage = (defaultValue: string) => {