diff --git a/projects/plugins/jetpack/_inc/client/searchable-modules/index.jsx b/projects/plugins/jetpack/_inc/client/searchable-modules/index.jsx index 69ac65264db73..991a424b31bec 100644 --- a/projects/plugins/jetpack/_inc/client/searchable-modules/index.jsx +++ b/projects/plugins/jetpack/_inc/client/searchable-modules/index.jsx @@ -5,7 +5,6 @@ import { withModuleSettingsFormHelpers } from 'components/module-settings/with-m import SettingsCard from 'components/settings-card'; import SettingsGroup from 'components/settings-group'; import { includes, forEach } from 'lodash'; -import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { @@ -30,7 +29,7 @@ export const SearchableModules = withModuleSettingsFormHelpers( } // Only render if search terms present - const searchTerms = this.props.searchTerm; + const searchTerms = this.props.searchTerm || ''; if ( searchTerms.length < 3 ) { return null; } @@ -84,14 +83,6 @@ export const SearchableModules = withModuleSettingsFormHelpers( } ); -SearchableModules.propTypes = { - searchTerm: PropTypes.string, -}; - -SearchableModules.defaultProps = { - searchTerm: '', -}; - class ActiveCard extends Component { render() { const m = this.props.moduleData, diff --git a/projects/plugins/jetpack/changelog/fix-defaultprops-connect-settings-form-warnings b/projects/plugins/jetpack/changelog/fix-defaultprops-connect-settings-form-warnings new file mode 100644 index 0000000000000..a910ebb9e70a7 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-defaultprops-connect-settings-form-warnings @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Admin page: Remove propTypes and defaultProps from code due to React legacy code warnings.