Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (providerId, data) => {
const plugin = app.pluginsMap[id]
if (
!_.isUndefined(plugin) &&
pluginsLoggingEnabled &&
plugin.enableLogging
) {
if (!plugin.logger) {
plugin.logger = getLogger(app, providerId)
}
plugin.logger(data)
}
app.handleMessage(id, data)
}
}
return (providerId: string, data: any) => {
const plugin = app.pluginsMap[id]
if (
!_.isUndefined(plugin) &&
pluginsLoggingEnabled &&
plugin.enableLogging
) {
if (!plugin.logger) {
plugin.logger = getLogger(app, providerId)
}
plugin.logger(data)
}
app.handleMessage(id, data)
}
}