From e0544dc1aa701e33d00f287f6448046e9206ce98 Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Tue, 21 May 2024 20:38:01 +0200 Subject: [PATCH] ignore null and undefined in echo --- src/prefix.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/prefix.js b/src/prefix.js index 462748a..2532e34 100644 --- a/src/prefix.js +++ b/src/prefix.js @@ -254,7 +254,10 @@ class WebAdapter { } this._term.error(message); } - echo(arg = "", options = {}) { + echo(arg = null, options = {}) { + if (arg === undefined || arg === null) { + return; + } if (typeof arg !== 'function') { arg = to_string(arg); }