Update hasReact conditional (#982)
* Update hasReact conditional
- Prevent error when a dependency key doesn't exist
- Check `optionalDependencies`
* Update index.js
* Update scripts/prepare/index.js
Co-authored-by: Phil Pluckthun <phil@kitten.sh>
Co-authored-by: Phil Pluckthun <phil@kitten.sh>
authored by