mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): edgeless text ai action should generate image correctly (#10158)
[BS-2570](https://linear.app/affine-design/issue/BS-2570/edgeless-text-没有被正确的作为上下文放入-app)
This commit is contained in:
@@ -23,7 +23,7 @@ export const LIT_REACT_PORTAL = 'lit-react-portal';
|
||||
@customElement(LIT_REACT_PORTAL)
|
||||
class LitReactPortal extends LitElement {
|
||||
portalId!: string;
|
||||
notify!: PortalListener;
|
||||
notify?: PortalListener;
|
||||
|
||||
static override get properties() {
|
||||
return {
|
||||
@@ -34,7 +34,7 @@ class LitReactPortal extends LitElement {
|
||||
|
||||
override connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.notify({
|
||||
this.notify?.({
|
||||
name: 'connectedCallback',
|
||||
target: this,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ class LitReactPortal extends LitElement {
|
||||
) {
|
||||
super.attributeChangedCallback(name, oldVal, newVal);
|
||||
if (name.toLowerCase() === 'portalid') {
|
||||
this.notify({
|
||||
this.notify?.({
|
||||
name: 'willUpdate',
|
||||
target: this,
|
||||
});
|
||||
@@ -61,7 +61,7 @@ class LitReactPortal extends LitElement {
|
||||
|
||||
override disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
this.notify({
|
||||
this.notify?.({
|
||||
name: 'disconnectedCallback',
|
||||
target: this,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user