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
Native: object fallback for element.style
  • Loading branch information
ellatrix committed Dec 17, 2019
commit 79632a62c9d6d4110ba3719c2c59a3e7a5a750fc
2 changes: 1 addition & 1 deletion packages/block-library/src/heading/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const transforms = {
},
transform( node ) {
const attributes = getBlockAttributes( name, node.outerHTML );
const { textAlign } = node.style;
const { textAlign } = node.style || {};

attributes.level = getLevelFromHeadingNodeName( node.nodeName );

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const transforms = {
} ),
transform( node ) {
const attributes = getBlockAttributes( name, node.outerHTML );
const { textAlign } = node.style;
const { textAlign } = node.style || {};

if (
textAlign === 'left' ||
Expand Down