From cf0c53e413faf7ed423273b60911eaa8632af868 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Mon, 20 Jan 2020 07:14:44 +0100 Subject: [PATCH] fixed error message on closing menu window (#254) --- srcjs/stendhal/ui/menu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcjs/stendhal/ui/menu.js b/srcjs/stendhal/ui/menu.js index f6278f88b24..e96bf11efa6 100644 --- a/srcjs/stendhal/ui/menu.js +++ b/srcjs/stendhal/ui/menu.js @@ -121,8 +121,9 @@ stendhal.ui.menu = { this.popup.popupdiv.addEventListener("click", function(e) { var cmd = e.target.id.substring(11); that.popup.close(); - console.log(cmd); - stendhal.slashActionRepository.execute("/" + cmd); + if (cmd) { + stendhal.slashActionRepository.execute("/" + cmd); + } }); this.close = function() {