refactor(editor): remove assertExists (#10615)

This commit is contained in:
Saul-Mirone
2025-03-05 00:13:08 +00:00
parent a6692f70aa
commit b8ecfbdae6
106 changed files with 863 additions and 517 deletions

View File

@@ -1,5 +1,4 @@
import { requestConnectedFrame } from '@blocksuite/affine-shared/utils';
import { assertExists } from '@blocksuite/global/utils';
import {
arrow,
type ComputePositionReturn,
@@ -193,7 +192,10 @@ export class Tooltip extends LitElement {
);
const parent = this.parentElement;
assertExists(parent, 'Tooltip must have a parent element');
if (!parent) {
console.error('Tooltip must have a parent element');
return;
}
// Wait for render
requestConnectedFrame(() => {