Fix null confrimation when no custom expressions

This commit is contained in:
Cohee
2025-02-21 02:05:43 +02:00
parent bdbcf8623e
commit cb6adc30ce

View File

@ -1601,8 +1601,9 @@ async function onClickExpressionAddCustom() {
async function onClickExpressionRemoveCustom() {
const selectedExpression = String($('#expression_custom').val());
const noCustomExpressions = extension_settings.expressions.custom.length === 0;
if (!selectedExpression) {
if (!selectedExpression || noCustomExpressions) {
console.debug('No custom expression selected');
return;
}