Skip to content

Commit

Permalink
Fix crash when preset has an 'includes any' filter (#195)
Browse files Browse the repository at this point in the history
* Fix release script

* Fix crash with preset and includes any

Sometimes from a preset the `value` element does not exist

* Update packages

* Bump versions
  • Loading branch information
johngodley authored Dec 29, 2024
1 parent 1c6d9c4 commit 75bac30
Show file tree
Hide file tree
Showing 5 changed files with 594 additions and 292 deletions.
36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "search-regex",
"version": "3.1.1",
"version": "3.1.2",
"description": "Adds search and replace functionality across posts, pages, comments, and meta-data, with full regular expression support",
"main": "search-regex.php",
"sideEffects": true,
Expand Down Expand Up @@ -30,50 +30,48 @@
"homepage": "https://github.com/johngodley/search-regex",
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@types/react-highlight-words": "^0.20.0",
"@types/react-redux": "^7.1.34",
"@wordpress/base-styles": "^5.12.0",
"@wordpress/eslint-plugin": "^21.5.0",
"@wordpress/prettier-config": "^4.12.0",
"@wordpress/scripts": "^30.5.1",
"@wordpress/base-styles": "^5.14.0",
"@wordpress/eslint-plugin": "^22.0.0",
"@wordpress/prettier-config": "^4.14.0",
"@wordpress/scripts": "^30.7.0",
"apidoc": "^1.2.0",
"chai": "^5.1.2",
"download": "^8.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mocha": "^10.8.2",
"mocha": "^11.0.1",
"node-fetch": "3",
"npm-check-updates": "^17.1.11",
"npm-check-updates": "^17.1.12",
"path": "^0.12.7",
"prettier": "npm:[email protected]",
"release-it": "^17.10.0",
"release-it": "^17.11.0",
"request": "^2.88.2",
"webpack-shell-plugin-next": "^2.3.2"
},
"dependencies": {
"@emotion/react": "^11.13.5",
"@emotion/react": "^11.14.0",
"@redux-devtools/extension": "^3.3.0",
"@wordpress/element": "^6.12.0",
"@wordpress/i18n": "^5.12.0",
"@wordpress/element": "^6.14.0",
"@wordpress/i18n": "^5.14.0",
"classnames": "^2.5.1",
"date-fns": "^4.1.0",
"deep-equal": "^2.2.3",
"file-saver": "^2.0.5",
"qs": "^6.13.1",
"rc-progress": "^4.0.0",
"rc-util": "^5.43.0",
"react": "^18.3.1",
"rc-util": "^5.44.3",
"react-copy-to-clipboard": "^5.1.0",
"react-datepicker": "^7.5.0",
"react-delta": "^1.1.2",
"react-dom": "^18.3.1",
"react-dropzone": "^14.3.5",
"react-focus-lock": "^2.13.2",
"react-focus-lock": "^2.13.5",
"react-highlight-words": "^0.20.0",
"react-redux": "^9.1.2",
"react-textarea-autosize": "^8.5.5",
"react-redux": "^9.2.0",
"react-textarea-autosize": "^8.5.6",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"typescript": "^5.7.2",
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: johnny5
Donate link: http://searchregex.com/donation/
Tags: search, replace, regex, regular expression, database
Tested up to: 6.7
Stable tag: 3.1.1
Stable tag: 3.1.2
License: GPLv3

Search Regex adds a powerful set of search and replace functions to WordPress posts, pages, custom post types, and other data.
Expand Down Expand Up @@ -120,6 +120,9 @@ Full documentation can be found on the [Search Regex](http://searchregex.com/) s

== Changelog ==

= 3.1.2 - December 29th 2024 =
* Fix crash when loading from a preset with an 'includes any'

= 3.1.1 - November 23rd 2024 =
* Update for WordPress 6.7

Expand Down
2 changes: 1 addition & 1 deletion search-regex.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Search Regex
Plugin URI: https://searchregex.com/
Description: Adds search and replace functionality across posts, pages, comments, and meta-data, with full regular expression support
Version: 3.1.1
Version: 3.1.2
Author: John Godley
Requires PHP: 7.0
Requires at least: 6.4
Expand Down
2 changes: 1 addition & 1 deletion src/state/preset/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function hasTags( tags, phrase ) {
}

export function hasFilterTag( tags, filter ) {
return filter.value && hasTags( tags, filter.value );
return filter?.value && hasTags( tags, filter.value );
}

export function hasActionTag( tags, action ) {
Expand Down
Loading

0 comments on commit 75bac30

Please sign in to comment.