Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_initAmplitude(key) {
this._amplitudeClient = amplitude.getInstance();
this._amplitudeClient.init(key);
if (!this.userID) {
throw new Error('userID is falsey');
}
this._amplitudeClient.setUserId(this.userID);
}