| 1601 | | 1601 | |
| 1602 | async function onClickExpressionRemoveCustom() { | 1602 | async 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; |
| 1604 | | 1605 | |
| 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 | } |