Skip to content

Commit a523f00

Browse files
fix: handle undefined value
1 parent 3634563 commit a523f00

File tree

1 file changed

+1
-1
lines changed
  • assets/apps/customizer-controls/src/repeater

1 file changed

+1
-1
lines changed

assets/apps/customizer-controls/src/repeater/Repeater.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const Repeater = ({
4444
for (const [field] of Object.entries(itemFields)) {
4545
newItem.visibility = 'yes';
4646

47-
if (typeof value[0][field] === 'boolean') {
47+
if (typeof value[0]?.[field] === 'boolean') {
4848
newItem[field] = true;
4949
if (field === 'hide_on_mobile') {
5050
newItem[field] = false;

0 commit comments

Comments
 (0)