Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions schemas/block-inserter-payload.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
"type": [ "string", "null" ],
"description": "SVG markup as a string, or null when the block has no renderable icon."
},
"iconForeground": {
"type": [ "string", "null" ],
"description": "CSS color (hex or rgba) applied to the SVG icon's foreground, or null when the block uses default tinting."
},
"frecency": { "type": "number" },
"isDisabled": { "type": "boolean" },
"isSearchOnly": { "type": "boolean" },
Expand Down
4 changes: 2 additions & 2 deletions src/utils/blocks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function assertBlockInserterPayloadShape( payload ) {
if ( validate( payload ) ) {
return;
}
const { instancePath, message } = validate.errors[ 0 ];
throw new Error( `${ instancePath || '/' }: ${ message }` );
const { instancePath, dataPath, message } = validate.errors[ 0 ];
throw new Error( `${ instancePath || dataPath || '/' }: ${ message }` );
}

function makeInserterItem( overrides = {} ) {
Expand Down
Loading