expo / ex-navigation

Route-centric navigation for React Native
997 stars 201 forks source link

Use correct this when setting _wrappedInstance #485

Closed kalasjocke closed 5 years ago

kalasjocke commented 7 years ago

I ran into an issue when trying to use the withNavigation HOC with the withRef option set to true. When using this option the withNavigation HOC sets the _wrappedInstance on this, but it does so on the wrong this. This pull request makes the setWrappedInstance use the correct this so one can use the getWrappedInstance() method properly.