react-flatpickr
Advanced tools
Comparing version 3.6.1 to 3.6.2
@@ -45,7 +45,7 @@ 'use strict'; | ||
_createClass(DateTimePicker, [{ | ||
key: 'componentDidReceiveProps', | ||
value: function componentDidReceiveProps(props, prevProps) { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(props) { | ||
var options = props.options; | ||
var prevOptions = prevProps.options; | ||
var prevOptions = this.props.options; | ||
@@ -65,4 +65,4 @@ // Add prop hooks to options | ||
// Add prev ones too so we can compare against them later | ||
if (prevProps.hasOwnProperty(hook)) { | ||
prevOptions[hook] = prevProps[hook]; | ||
if (this.props.hasOwnProperty(hook)) { | ||
prevOptions[hook] = this.props[hook]; | ||
} | ||
@@ -101,3 +101,3 @@ } | ||
if (props.hasOwnProperty('value') && props.value !== prevProps.value) { | ||
if (props.hasOwnProperty('value') && props.value !== this.props.value) { | ||
this.flatpickr.setDate(props.value, false); | ||
@@ -104,0 +104,0 @@ } |
@@ -42,5 +42,5 @@ | ||
componentDidReceiveProps(props, prevProps) { | ||
componentWillReceiveProps(props) { | ||
const { options } = props | ||
const prevOptions = prevProps.options | ||
const prevOptions = this.props.options | ||
@@ -53,4 +53,4 @@ // Add prop hooks to options | ||
// Add prev ones too so we can compare against them later | ||
if (prevProps.hasOwnProperty(hook)) { | ||
prevOptions[hook] = prevProps[hook] | ||
if (this.props.hasOwnProperty(hook)) { | ||
prevOptions[hook] = this.props[hook] | ||
} | ||
@@ -75,3 +75,3 @@ } | ||
if (props.hasOwnProperty('value') && props.value !== prevProps.value) { | ||
if (props.hasOwnProperty('value') && props.value !== this.props.value) { | ||
this.flatpickr.setDate(props.value, false) | ||
@@ -78,0 +78,0 @@ } |
{ | ||
"name": "react-flatpickr", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"description": "flatpickr for React", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1
14647
4
291