diff --git a/lib/agent/providers/hardware/index.js b/lib/agent/providers/hardware/index.js index d2efa1ddd..0222a276b 100644 --- a/lib/agent/providers/hardware/index.js +++ b/lib/agent/providers/hardware/index.js @@ -7,16 +7,13 @@ "use strict"; -var _ = require('underscore'), - os = require('os'), +var os = require('os'), async = require('async'), network = require('network'), hooks = require('./../../hooks'), common = require('./../../common'), logger = common.logger.prefix('hardware'), os_name = process.platform.replace('darwin', 'mac').replace('win32', 'windows'), - common = require('./../../../common'), - logger = common.logger.prefix('hardware'), storage = require('./../../utils/storage'), os_functions = require('./' + os_name), exp = module.exports; @@ -98,7 +95,7 @@ exp.track_hardware_changes = (data) => { if (!current || (current.length > stored.length)) return diff_count++; stored.forEach((value) => { const foundIndex = current.findIndex((element) => element === value); - if (foundIndex === -1) return diffCount++; + if (foundIndex === -1) return diff_count++; }); } else if (stored instanceof Object) { if (!current || (Object.keys(current).length > Object.keys(stored).length)) return diff_count++;