Skip to content

Commit

Permalink
Bugfix: can't access property "classNames", config is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
djmaze committed Apr 9, 2021
1 parent b768459 commit 478ba00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vendors/squire/build/squire-raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,13 +1381,13 @@ const
},
fontFamily: {
regexp: notWS,
replace: ( doc, classNames, family ) => createElement( 'SPAN', {
replace: ( doc, family ) => createElement( 'SPAN', {
style: 'font-family:' + family
})
},
fontSize: {
regexp: notWS,
replace: ( doc, classNames, size ) => createElement( 'SPAN', {
replace: ( doc, size ) => createElement( 'SPAN', {
style: 'font-size:' + size
})
},
Expand All @@ -1411,15 +1411,15 @@ const
return el;
},

replaceStyles = ( node, parent, config ) => {
replaceStyles = node => {
let style = node.style;
let attr, converter, css, newTreeBottom, newTreeTop, el;

for ( attr in styleToSemantic ) {
converter = styleToSemantic[ attr ];
css = style[ attr ];
if ( css && converter.regexp.test( css ) ) {
el = converter.replace( doc, config.classNames, css );
el = converter.replace( doc, css );
if ( el.nodeName === node.nodeName &&
el.className === node.className ) {
continue;
Expand Down

0 comments on commit 478ba00

Please sign in to comment.