Fix null confrimation when no custom expressions

cb6adc30ce0e5e97a30fec160859a21427a4495b

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Showing whitespace changes
public/scripts/extensions/expressions/index.js+2 -1
@@ -1601,8 +1601,9 @@ async function onClickExpressionAddCustom() {
16011601
1602async function onClickExpressionRemoveCustom() {1602async function onClickExpressionRemoveCustom() {
1603 const selectedExpression = String($('#expression_custom').val());1603 const selectedExpression = String($('#expression_custom').val());
1604 const noCustomExpressions = extension_settings.expressions.custom.length === 0;
16041605
1605 if (!selectedExpression) {1606 if (!selectedExpression || noCustomExpressions) {
1606 console.debug('No custom expression selected');1607 console.debug('No custom expression selected');
1607 return;1608 return;
1608 }1609 }