This commit is contained in:
@@ -33,7 +33,7 @@ const HTMLEditor = (props: HTMLEditorProps) => {
|
||||
const attemptHighlight = (attempts = 0) => {
|
||||
if (attempts > 3) return // Максимум 3 попытки
|
||||
|
||||
if (typeof window !== 'undefined' && window.Prism && element) {
|
||||
if (window?.Prism && element) {
|
||||
try {
|
||||
Prism.highlightElement(element)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user