-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Block] FootnotesAffects the Footnotes BlockAffects the Footnotes Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
In function updateAttributes(attributes) in const updateFootnotes called in the footnote block,
Recursive calls to the updateAttributes function
if (Array.isArray(value)) {
attributes[key] = value.map(updateAttributes);
continue;
}
If there is an attribute of an array of strings at this time
imgSizes : {
type: "array",
items: {
type: "string"
},
default: []
},
For example, the string "1024x768" is converted to {0: "1", 1: "0", 2: "2", 3: "4", 4: "x", 5: "7", 6: "6", 7: "8"} and an error occurs
Step-by-step reproduction instructions
This happens when you manipulate the footnote block in the editor.
This happens in blocks that use an array of strings in the attributes, but does not seem to be used in the core block.
Screenshots, screen recording, code snippet
Environment info
WordPress 6.3 RC2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
andrewserong
Metadata
Metadata
Assignees
Labels
[Block] FootnotesAffects the Footnotes BlockAffects the Footnotes Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
