mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
refactor(editor): remove assertExists (#10615)
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user