Skip to content

Commit ee6267f

Browse files
SiobhyBfluiddot
andcommitted
fix: Rename playsInline to conform to Video block
Co-Authored-By: Carlos Garcia <[email protected]>
1 parent 68f87a4 commit ee6267f

File tree

1 file changed

+8
-1
lines changed
  • projects/plugins/jetpack/extensions/blocks/videopress

1 file changed

+8
-1
lines changed

projects/plugins/jetpack/extensions/blocks/videopress/save.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ const VideoPressSave = CoreVideoSave => props => {
4242
* @see https://github.com/WordPress/gutenberg/blob/c5f9bd88125282a0c35f887cc8d835f065893112/packages/editor/src/hooks/generated-class-name.js#L42
4343
* @see https://github.com/Automattic/wp-calypso/pull/30546#issuecomment-463637946
4444
*/
45-
return CoreVideoSave( props );
45+
// Rename `playsinline` to `playsInline` to conform the block schema of core Video block.
46+
const { playsinline: videoPressPlayinline, ...restAttributes } = props.attributes;
47+
const coreVideoAttributes = { ...restAttributes, playsInline: playsinline };
48+
49+
return CoreVideoSave( {
50+
...props,
51+
attributes: coreVideoAttributes,
52+
} );
4653
}
4754

4855
const url = getVideoPressUrl( guid, {

0 commit comments

Comments
 (0)