Skip to content

Commit a2fea1f

Browse files
authored
Merge pull request #104 from KevinBatdorf/add-safety-check-for-attributes
Add additional check for attributes
2 parents fdf522c + a829387 commit a2fea1f

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

pattern-css.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Description: Lightening Fast, Safe, In-editor CSS Optimization and Minification Tool
55
* Requires at least: 6.0
66
* Requires PHP: 7.0
7-
* Version: 1.2.4
7+
* Version: 1.2.5
88
* Author: Kevin Batdorf
99
* Author URI: https://twitter.com/kevinbatdorf
1010
* License: GPL-2.0-or-later

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: kbat82
33
Tags: css, styles, inline, margin, pattern
44
Tested up to: 6.6
5-
Stable tag: 1.2.4
5+
Stable tag: 1.2.5
66
License: GPL-2.0-or-later
77
License URI: https://www.gnu.org/licenses/gpl-2.0.html
88

@@ -131,6 +131,9 @@ Add this to functions.php:
131131

132132
== Changelog ==
133133

134+
= 1.2.5 - 2024-07-28 =
135+
- Fixed a small bug where a block may not have attributes when we access them.
136+
134137
= 1.2.4 - 2024-07-21 =
135138
- Renamed the panel to Pattern CSS to differenciate it from the core panel on FSE
136139

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ addFilter(
4545
};
4646
return {
4747
...settings,
48-
attributes: { ...settings.attributes, ...blockAttributes },
48+
attributes: { ...(settings?.attributes ?? {}), ...blockAttributes },
4949
};
5050
},
5151
);

0 commit comments

Comments
 (0)