react-render-defender
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -7,13 +7,13 @@ 'use strict'; | ||
exports.default = logAllUpdates; | ||
var comparePropsAndState = function comparePropsAndState(component, prevProps, prevState) { | ||
var getCustomSettings = function getCustomSettings() { | ||
var opts = {}; | ||
try { | ||
return opts = require(process.env.ROOT + '/rdefender.json'); | ||
} catch (err) {} | ||
return opts; | ||
}; | ||
var getCustomSettings = function getCustomSettings() { | ||
var customSettings = {}; | ||
try { | ||
customSettings = require(process.env.ROOT + '/rdefender.json'); | ||
} catch (err) {} | ||
return customSettings; | ||
}; | ||
var customSettings = getCustomSettings(); | ||
var customSettings = getCustomSettings(); | ||
var comparePropsAndState = function comparePropsAndState(component, prevProps, prevState) { | ||
var propChanges = []; | ||
@@ -48,5 +48,5 @@ var stateChanges = []; | ||
var timeRenderDiff = newRenderTimeStamp - this.previousRenderTimeStamp; | ||
var threshold = settings[this.constructor.name] || 200; | ||
var threshold = customSettings[this.constructor.name] || 200; | ||
if (!settings.quiet_mode) { | ||
if (!customSettings.quiet_mode) { | ||
if (timeRenderDiff < threshold) { | ||
@@ -53,0 +53,0 @@ var diff = comparePropsAndState(this, prevProps, prevState); |
@@ -39,3 +39,3 @@ { | ||
}, | ||
"version": "1.1.0" | ||
"version": "1.1.1" | ||
} |
@@ -1,12 +0,12 @@ | ||
const comparePropsAndState = (component, prevProps, prevState) => { | ||
const getCustomSettings = () => { | ||
let opts = {} ; | ||
try { | ||
return opts = require(process.env.ROOT+'/rdefender.json'); | ||
} catch(err) {} | ||
return opts; | ||
} | ||
const getCustomSettings = () => { | ||
let customSettings = {} ; | ||
try { | ||
customSettings = require(process.env.ROOT+'/rdefender.json'); | ||
} catch(err) {} | ||
return customSettings; | ||
} | ||
const customSettings = getCustomSettings(); | ||
const customSettings = getCustomSettings(); | ||
const comparePropsAndState = (component, prevProps, prevState) => { | ||
const propChanges = []; | ||
@@ -41,5 +41,5 @@ const stateChanges = []; | ||
const timeRenderDiff = newRenderTimeStamp - this.previousRenderTimeStamp; | ||
const threshold = settings[this.constructor.name] || 200 | ||
const threshold = customSettings[this.constructor.name] || 200 | ||
if(!settings.quiet_mode) { | ||
if(!customSettings.quiet_mode) { | ||
if (timeRenderDiff < threshold) { | ||
@@ -46,0 +46,0 @@ const diff = comparePropsAndState(this, prevProps, prevState); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5584