Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function bootstrap() {
if (alreadyBootstrap) {
return enabled
}
alreadyBootstrap = true
if (isPlatformSupported()) {
patchAll()
enabled = true
} else if (typeof window !== 'undefined') {
/**
* Print this error message only on the browser console
* on unsupported browser versions
*/
console.log('[Elastic APM] platform is not supported!')
}
return enabled
}