From 7e2ea5b1d2cf204a82d97042c21de56254dd113a Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Sun, 2 Dec 2018 11:25:25 -0500 Subject: [PATCH] fix for missing param2 --- api.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api.lua b/api.lua index 4c07c86..8fa8c11 100644 --- a/api.lua +++ b/api.lua @@ -39,6 +39,10 @@ end -- @return nil if node doesn't exists or nodename with mode prefix -- @see https://github.com/Uberi/Minetest-WorldEdit function x_marketplace.normalize_nodename(nodename) + if not nodename then + return false + end + nodename = nodename:gsub("^%s*(.-)%s*$", "%1") -- strip spaces if nodename == "" then return nil end