Skip to content
Snippets Groups Projects
Unverified Commit 622a09f8 authored by FineArchs's avatar FineArchs Committed by GitHub
Browse files

Fix: `Mk:C:mfm`の`onClickEv`が正常に呼び出されない問題を修正 (#12831)

* fix clickable api

* Update CHANGELOG.md

* revert CHANGELOG.md

* Update CHANGELOG.md
parent 00e195f5
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......@@ -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)]);
},
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment