mirror of
https://github.com/zadam/trilium.git
synced 2025-12-22 16:20:08 +01:00
feat(ckeditor/watchdog): ignore parent check (closes #5776)
This commit is contained in:
20
packages/ckeditor5/src/custom_watchdog.ts
Normal file
20
packages/ckeditor5/src/custom_watchdog.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { CKEditorError, EditorWatchdog } from "ckeditor5";
|
||||
|
||||
const IGNORED_ERRORS = [
|
||||
// See: https://github.com/TriliumNext/Trilium/issues/5776
|
||||
"TypeError: Cannot read properties of null (reading 'parent')"
|
||||
]
|
||||
|
||||
export default class CustomWatchdog extends EditorWatchdog {
|
||||
|
||||
_isErrorComingFromThisItem(error: CKEditorError): boolean {
|
||||
for (const ignoredError of IGNORED_ERRORS) {
|
||||
if (error.message.includes(ignoredError)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return super._isErrorComingFromThisItem(error);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user