diff --git a/index.js b/index.js index d5afd4b..aec6a3a 100755 --- a/index.js +++ b/index.js @@ -164,16 +164,14 @@ class NodeClam { const settings = {}; if (Object.prototype.hasOwnProperty.call(options, 'clamscan') && Object.keys(options.clamscan).length > 0) { settings.clamscan = { ...this.defaults.clamscan, ...options.clamscan }; - delete options.clamscan; } if ( Object.prototype.hasOwnProperty.call(options, 'clamdscan') && Object.keys(options.clamdscan).length > 0 ) { settings.clamdscan = { ...this.defaults.clamdscan, ...options.clamdscan }; - delete options.clamdscan; } - this.settings = { ...this.defaults, ...settings, ...options }; + this.settings = { ...this.defaults, ...options, ...settings }; if (this.settings && 'debugMode' in this.settings && this.settings.debugMode === true) console.log(`${this.debugLabel}: DEBUG MODE ON`);