react-native-dialog-component icon indicating copy to clipboard operation
react-native-dialog-component copied to clipboard

undefined is not an object (evaluating dialog.destroy)

Open ashokkumar88 opened this issue 7 years ago • 5 comments

Hi,

When I dismiss a dialog via DialogManager.dismiss(() => { console.log('callback - dismiss'); }); the dialog is dismissed but i m getting error. screenshot attached. screenshot_20180518-131147

ashokkumar88 avatar May 18 '18 07:05 ashokkumar88

Can you solve this?

enkhtulga avatar Jul 20 '18 02:07 enkhtulga

@jacklam718 , have you got any idea?

enkhtulga avatar Jul 20 '18 02:07 enkhtulga

You need to add a check on DialogManager.js inside the node modules node_modules/react-native-dialog-component/dist/DialogManager.js

line no 129 if (dialog != undefined) dialog.destroy();

Just add the check above dialog.destroy()

like this:- screen shot 2018-12-04 at 3 04 13 pm

tarunjoshi-evontech avatar Dec 04 '18 09:12 tarunjoshi-evontech

It helped thanks. By the way, I really like this type of libraries. It works out of render method, you dont have to embed it into other components. Just called it from show() method, just like Alert.alert().

yalcinozer avatar Nov 12 '20 09:11 yalcinozer

hello, is this already fixed? looks like I had the same problem.

widianapw avatar Apr 20 '21 15:04 widianapw