Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Spread metadata when loading block in frontend (#5732)
Browse files Browse the repository at this point in the history
  • Loading branch information
opr authored Feb 8, 2022
1 parent 85920bd commit 7579cbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/blocks/checkout/frontend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ import { renderParentBlock } from '@woocommerce/atomic-utils';
import './inner-blocks/register-components';
import Block from './block';
import { blockName, blockAttributes } from './attributes';
import metadata from './block.json';

const getProps = ( el: Element ) => {
return {
attributes: getValidBlockAttributes(
blockAttributes,
{ ...metadata.attributes, ...blockAttributes },
/* eslint-disable @typescript-eslint/no-explicit-any */
( el instanceof HTMLElement ? el.dataset : {} ) as any
),
Expand Down

0 comments on commit 7579cbb

Please sign in to comment.