jacklam718 / react-native-dialog-component

A react native dialog component support custom animation for IOS & Android.
https://www.npmjs.com/package/react-native-dialog-component
MIT License
81 stars 29 forks source link

undefined is not an object (evaluating dialog.destroy) #15

Open ashokkumar88 opened 6 years ago

ashokkumar88 commented 6 years ago

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

enkhtulga commented 6 years ago

Can you solve this?

enkhtulga commented 6 years ago

@jacklam718 , have you got any idea?

tarunjoshi-evontech commented 5 years ago

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

yalcinozer commented 3 years ago

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().

widianapw commented 3 years ago

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