1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:47:35 +00:00

BrowserSettings: Avoid adding empty domain to content filter

This commit is contained in:
ferhatgec 2022-06-17 02:23:00 +03:00 committed by Linus Groh
parent 51315c0b1d
commit e9e1959d4c

View file

@ -119,7 +119,9 @@ ContentFilterSettingsWidget::ContentFilterSettingsWidget()
m_add_new_domain_button->on_click = [&](unsigned) { m_add_new_domain_button->on_click = [&](unsigned) {
String text; String text;
if (GUI::InputBox::show(window(), text, "Enter domain name", "Add domain to Content Filter") == GUI::Dialog::ExecResult::OK) {
if (GUI::InputBox::show(window(), text, "Enter domain name", "Add domain to Content Filter") == GUI::Dialog::ExecResult::OK
&& !text.is_empty()) {
m_domain_list_model->add_domain(std::move(text)); m_domain_list_model->add_domain(std::move(text));
set_modified(true); set_modified(true);
} }