colorfy-software / react-native-modalfy

🥞 Modal citizen of React Native.
https://colorfy-software.gitbook.io/react-native-modalfy
MIT License
1.13k stars 46 forks source link

fix: getParam should use defaultValue only when param is undefined #74

Closed edwinkcw closed 2 years ago

edwinkcw commented 2 years ago

I have a modal which has an optional boolean parameter.

  ErrorModal: {
    dismissible?: boolean;
  };

When I open the modal openModal('ErrorModal', { dismissible: false} ) and then handle the parameters inside the Modal using const dismissible = getParam('dismissible', true), it returns true even I passed the value false inside.

CharlesMangwa commented 2 years ago

Thank you for catching this one @edwinkcw! LGTM! 🚀