mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 21:03:09 +02:00
updated to use .some
This commit is contained in:
parent
0c28bfdb63
commit
3c4f3cb81d
1 changed files with 17 additions and 19 deletions
|
@ -747,9 +747,9 @@ async function post(ev?: MouseEvent) {
|
||||||
|
|
||||||
if (defaultStore.state.warnMissingAltText) {
|
if (defaultStore.state.warnMissingAltText) {
|
||||||
const filesData = toRaw(files.value);
|
const filesData = toRaw(files.value);
|
||||||
for (let i = 0; i < filesData.length; i++) {
|
|
||||||
const file = filesData[i];
|
const isMissingAltText = filesData.some(file => !file.comment);
|
||||||
const isMissingAltText = !file.comment;
|
|
||||||
if (isMissingAltText) {
|
if (isMissingAltText) {
|
||||||
const { canceled, result } = await os.actions({
|
const { canceled, result } = await os.actions({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
@ -765,8 +765,6 @@ async function post(ev?: MouseEvent) {
|
||||||
|
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
if (result === 'cancel') return;
|
if (result === 'cancel') return;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue