Skip to content

Commit

Permalink
avoid mutating fontface data (#58473)
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto authored Jan 31, 2024
1 parent eab51ec commit cd1baa0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ export function makeFontFamilyFormData( fontFamily ) {

export function makeFontFacesFormData( font ) {
if ( font?.fontFace ) {
const fontFacesFormData = font.fontFace.map( ( face, faceIndex ) => {
const fontFacesFormData = font.fontFace.map( ( item, faceIndex ) => {
const face = { ...item };
const formData = new FormData();
if ( face.file ) {
// Normalize to an array, since face.file may be a single file or an array of files.
Expand Down

1 comment on commit cd1baa0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in cd1baa0.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7726215450
📝 Reported issues:

Please sign in to comment.