From c37939b51cc01db39717c4b6954e53b6bcb2f12f Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Fri, 21 Sep 2018 12:24:05 +0100 Subject: [PATCH] [Minor] Return nil if a random string used as selector --- lualib/lua_selectors.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua index d33f6f0c72..7de1a10d89 100644 --- a/lualib/lua_selectors.lua +++ b/lualib/lua_selectors.lua @@ -743,7 +743,7 @@ exports.parse_selector = function(cfg, str) local parsed = {parser:match(str)} local output = {} - if not parsed then return nil end + if not parsed or not parsed[1] then return nil end -- Output AST format is the following: -- table of individual selectors -- 2.47.3