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:
donteatfriedrice
2025-02-13 09:38:12 +00:00
parent 887bbcf641
commit 40c6e42ab8
3 changed files with 39 additions and 39 deletions

View File

@@ -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,
});