CWを使用する場合、注釈を空にすることを許可しない

Resolve #12217
This commit is contained in:
syuilo 2023-11-03 08:17:35 +09:00
parent 7f5ad5badb
commit 82526ad4f3
5 changed files with 13 additions and 2 deletions

View file

@ -658,6 +658,14 @@ function deleteDraft() {
}
async function post(ev?: MouseEvent) {
if (useCw && (cw == null || cw.trim() === '')) {
os.alert({
type: 'error',
text: i18n.ts.cwNotationRequired,
});
return;
}
if (ev) {
const el = ev.currentTarget ?? ev.target;
const rect = el.getBoundingClientRect();