mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-08 14:14:26 +08:00
Bugfix: can't access property "classNames", config is undefined
This commit is contained in:
parent
b768459bec
commit
478ba00321
1 changed files with 4 additions and 4 deletions
8
vendors/squire/build/squire-raw.js
vendored
8
vendors/squire/build/squire-raw.js
vendored
|
@ -1381,13 +1381,13 @@ const
|
||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
regexp: notWS,
|
regexp: notWS,
|
||||||
replace: ( doc, classNames, family ) => createElement( 'SPAN', {
|
replace: ( doc, family ) => createElement( 'SPAN', {
|
||||||
style: 'font-family:' + family
|
style: 'font-family:' + family
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fontSize: {
|
fontSize: {
|
||||||
regexp: notWS,
|
regexp: notWS,
|
||||||
replace: ( doc, classNames, size ) => createElement( 'SPAN', {
|
replace: ( doc, size ) => createElement( 'SPAN', {
|
||||||
style: 'font-size:' + size
|
style: 'font-size:' + size
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1411,7 +1411,7 @@ const
|
||||||
return el;
|
return el;
|
||||||
},
|
},
|
||||||
|
|
||||||
replaceStyles = ( node, parent, config ) => {
|
replaceStyles = node => {
|
||||||
let style = node.style;
|
let style = node.style;
|
||||||
let attr, converter, css, newTreeBottom, newTreeTop, el;
|
let attr, converter, css, newTreeBottom, newTreeTop, el;
|
||||||
|
|
||||||
|
@ -1419,7 +1419,7 @@ const
|
||||||
converter = styleToSemantic[ attr ];
|
converter = styleToSemantic[ attr ];
|
||||||
css = style[ attr ];
|
css = style[ attr ];
|
||||||
if ( css && converter.regexp.test( css ) ) {
|
if ( css && converter.regexp.test( css ) ) {
|
||||||
el = converter.replace( doc, config.classNames, css );
|
el = converter.replace( doc, css );
|
||||||
if ( el.nodeName === node.nodeName &&
|
if ( el.nodeName === node.nodeName &&
|
||||||
el.className === node.className ) {
|
el.className === node.className ) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue