mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
error checking update
This commit is contained in:
@@ -92,7 +92,7 @@ export function markdownToHTMLSafe({
|
||||
const html = markdownToHtmlNoImages(markdownString);
|
||||
const replacedHtml = replaceText.reduce(
|
||||
(acc, { source, destination, strict = false }) => {
|
||||
if (strict) {
|
||||
if (strict && acc.includes(source)) {
|
||||
if (typeof destination === "undefined" || destination === null) {
|
||||
throw new Error(
|
||||
`Text replacement failed: destination is undefined for source "${source}"`
|
||||
|
||||
Reference in New Issue
Block a user