Skip to content

Conversation

@Maquert
Copy link

@Maquert Maquert commented Jun 15, 2017

Summary

Sentry.isNativeClientAvailable()
Currently, calling this function can throw undefined, so we end up writing something like:

const isInstalled = Sentry.isNativeClientAvailable() !== undefined;

In my opinion, this should return either true or false. I'd like to get something like this:

const isInstalled = Sentry.isNativeClientAvailable();

Use case

In our case, we need to instantiate a shared util that configures Sentry on the go. We need to do this just once, so we ask Sentry if is ready/installed many times, but we set it up just the first one.

Disclaimer: not a big JS fan or expert here. And if there is a better way to achieve this behaviour, please let me know!

Currently calling this function can throw undefined, so we end up writing something like .

IMHO this should return either true or false.
@HazAT HazAT merged commit e21ca72 into getsentry:master Jun 15, 2017
@HazAT
Copy link
Member

HazAT commented Jun 15, 2017

Thx 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants