1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Browser: Ignore whitespace-only input in the JS console

This commit is contained in:
Sam Atkins 2022-09-20 15:52:30 +01:00 committed by Sam Atkins
parent a1f1369775
commit a875713f2e

View file

@ -45,8 +45,7 @@ ConsoleWidget::ConsoleWidget()
m_input->on_return_pressed = [this] {
auto js_source = m_input->text();
// FIXME: An is_blank check to check if there is only whitespace would probably be preferable.
if (js_source.is_empty())
if (js_source.is_whitespace())
return;
m_input->add_current_text_to_history();