Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} catch (ex) {
logger.error(ex);
config.isValidInstance = false;
}
// Explicitly check for null or undefined
// prettier-ignore
if (config.skipJSONValidation == null) { // eslint-disable-line eqeqeq
config.skipJSONValidation = true;
}
var eventDispatcher;
// prettier-ignore
if (config.eventDispatcher == null) { // eslint-disable-line eqeqeq
// only wrap the event dispatcher with pending events retry if the user didnt override
eventDispatcher = new eventProcessor.LocalStoragePendingEventsDispatcher({
eventDispatcher: defaultEventDispatcher,
});
if (!hasRetriedEvents) {
eventDispatcher.sendPendingEvents();
hasRetriedEvents = true;
}
} else {
eventDispatcher = config.eventDispatcher;
}
config = fns.assignIn(
{
clientEngine: enums.JAVASCRIPT_CLIENT_ENGINE,
eventBatchSize: DEFAULT_EVENT_BATCH_SIZE,
eventFlushInterval: DEFAULT_EVENT_FLUSH_INTERVAL,