]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_html: Fix traversing to the top-most parent
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 21 Feb 2019 12:01:15 +0000 (12:01 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 21 Feb 2019 12:01:15 +0000 (12:01 +0000)
src/lua/lua_html.c

index 739776b01eba1b1422c7f9c49b8a0b7692e51ba7..63839c2866bd28fbd3541a306a489160899439dc 100644 (file)
@@ -594,6 +594,9 @@ lua_html_tag_get_parent (lua_State *L)
                        *ptag = node->data;
                        rspamd_lua_setclass (L, "rspamd{html_tag}", -1);
                }
+               else {
+                       lua_pushnil (L);
+               }
        }
        else {
                return luaL_error (L, "invalid arguments");