Skip to content

Commit

Permalink
Fix: Mk:C:mfmonClickEvが正常に呼び出されない問題を修正 (#12831)
Browse files Browse the repository at this point in the history
* fix clickable api

* Update CHANGELOG.md

* revert CHANGELOG.md

* Update CHANGELOG.md
  • Loading branch information
FineArchs authored Jan 7, 2024
1 parent 00e195f commit 622a09f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/scripts/aiscript/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function getTextOptions(def: values.Value | undefined): Omit<AsUiText, 'id' | 't
};
}

function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'type'> {
function getMfmOptions(def: values.Value | undefined, call: (fn: values.VFn, args: values.Value[]) => Promise<values.Value>): Omit<AsUiMfm, 'id' | 'type'> {
utils.assertObject(def);

const text = def.value.get('text');
Expand All @@ -241,7 +241,7 @@ function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'typ
color: color?.value,
font: font?.value,
onClickEv: (evId: string) => {
if (onClickEv) call(onClickEv, values.STR(evId));
if (onClickEv) call(onClickEv, [values.STR(evId)]);
},
};
}
Expand Down

0 comments on commit 622a09f

Please sign in to comment.