-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Math: Format and block trigger an error in WP 6.9 #76182
Copy link
Copy link
Closed
Labels
[Block] Math[Package] Format library/packages/format-library/packages/format-library[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
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'
gutenberg/packages/format-library/src/math/index.js
Lines 133 to 137 in d419b56
| useEffect( () => { | |
| import( '@wordpress/latex-to-mathml' ).then( ( module ) => { | |
| setLatexToMathML( () => module.default ); | |
| } ); | |
| }, [] ); |
gutenberg/packages/block-library/src/math/edit.js
Lines 35 to 51 in d419b56
| 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, | |
| ] ); |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Block] Math[Package] Format library/packages/format-library/packages/format-library[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.