diff --git a/lib/winston/logger.js b/lib/winston/logger.js index 8855a9dc3..a3f60a7ae 100644 --- a/lib/winston/logger.js +++ b/lib/winston/logger.js @@ -373,6 +373,7 @@ class Logger extends Transform { * @returns {Logger} - TODO: add return description. */ remove(transport) { + if (!transport) return this; let target = transport; if (!isStream(transport) || transport.log.length > 2) { target = this.transports.filter(