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
7 changes: 6 additions & 1 deletion packages/wordpress-plugin/assets/browser-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,12 @@ try {
throw new Error( 'WP Codebox browser recipe missing.' );
}

await client.writeFile( taskPath, JSON.stringify( taskPayload ) );
const payload = taskPayload && typeof taskPayload === 'object' ? taskPayload : recipe?.browser?.task_payload;
if ( ! payload || typeof payload !== 'object' ) {
throw new Error( 'WP Codebox browser recipe task payload missing.' );
}

await client.writeFile( taskPath, JSON.stringify( payload ) );

let lastResult = null;
for ( const step of steps ) {
Expand Down
Loading