Skip to content

Math: Format and block trigger an error in WP 6.9 #76182

@Mamaduka

Description

@Mamaduka

I noticed that when running Gutenberg trunk with WP 6.9, the Math format triggers an error. The same error occurs when inserting the math block.

Uncaught (in promise) TypeError: Failed to resolve module specifier '@wordpress/latex-to-mathml'

useEffect( () => {
import( '@wordpress/latex-to-mathml' ).then( ( module ) => {
setLatexToMathML( () => module.default );
} );
}, [] );

useEffect( () => {
import( '@wordpress/latex-to-mathml' ).then( ( module ) => {
setLatexToMathML( () => module.default );
if ( initialLatex.current ) {
__unstableMarkNextChangeAsNotPersistent();
setAttributes( {
mathML: module.default( initialLatex.current, {
displayMode: true,
} ),
} );
}
} );
}, [
initialLatex,
setAttributes,
__unstableMarkNextChangeAsNotPersistent,
] );

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions