fix code quality issues

This commit is contained in:
まっちゃとーにゅ
2024-01-31 06:18:54 +09:00
parent 9ffa56aa1b
commit b6f6c3ea18
27 changed files with 63 additions and 64 deletions

View File

@@ -352,7 +352,7 @@ if (props.specified) {
}
// keep cw when reply
if (defaultStore.state.keepCw && props.reply && props.reply.cw) {
if (defaultStore.state.keepCw && props.reply?.cw) {
useCw.value = true;
cw.value = props.reply.cw;
}
@@ -603,7 +603,7 @@ async function onPaste(ev: ClipboardEvent) {
return;
}
quoteId.value = paste.substring(url.length).match(/^\/notes\/(.+?)\/?$/)?.[1] ?? null;
quoteId.value = RegExp(/^\/notes\/(.+?)\/?$/).exec(paste.substring(url.length))?.[1] ?? null;
});
}
}