Skip to content

Commit 1b40291

Browse files
fix: ignore no wiris image (#1017)
1 parent 730fa5e commit 1b40291

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/ckeditor5/src/plugin.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,10 @@ export default class MathType extends Plugin {
523523
// If we found a formula image, we should find MathML data, and then substitute the entire image.
524524
const regexp = /«math\b[^»]*»(.*?)«\/math»/g;
525525
const safexml = formula.match(regexp);
526-
let decodeXML = MathML.safeXmlDecode(safexml[0]);
527-
modifiedData = modifiedData.replace(formula, decodeXML);
526+
if(safexml !== null) {
527+
let decodeXML = MathML.safeXmlDecode(safexml[0]);
528+
modifiedData = modifiedData.replace(formula, decodeXML);
529+
}
528530
}
529531
});
530532

0 commit comments

Comments
 (0)