mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:37:44 +00:00
Browser: Ignore whitespace-only input in the JS console
This commit is contained in:
parent
a1f1369775
commit
a875713f2e
1 changed files with 1 additions and 2 deletions
|
@ -45,8 +45,7 @@ ConsoleWidget::ConsoleWidget()
|
||||||
m_input->on_return_pressed = [this] {
|
m_input->on_return_pressed = [this] {
|
||||||
auto js_source = m_input->text();
|
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_whitespace())
|
||||||
if (js_source.is_empty())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_input->add_current_text_to_history();
|
m_input->add_current_text_to_history();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue