mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(editor): use nullable inline editor root element (#9320)
Fixes `sentry-7906c03b79a54ede819c56cc15ad9889`
This commit is contained in:
@@ -321,6 +321,9 @@ export class AtMenuConfigService extends Service {
|
||||
close();
|
||||
|
||||
const getRect = () => {
|
||||
if (!inlineEditor.rootElement) {
|
||||
return { x: 0, y: 0, width: 0, height: 0 };
|
||||
}
|
||||
let rect = inlineEditor.getNativeRange()?.getBoundingClientRect();
|
||||
|
||||
if (!rect || rect.width === 0 || rect.height === 0) {
|
||||
|
||||
Reference in New Issue
Block a user