From: Jo-Philipp Wich Date: Fri, 14 Feb 2020 07:40:15 +0000 (+0100) Subject: luci-base: luci.js: L.dom.data(): gracefully handle non-node argument X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=308215ca156212ad2a632b31179c2284a59a8556;p=oweals%2Fluci.git luci-base: luci.js: L.dom.data(): gracefully handle non-node argument Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 2cb346c81..8d056ec03 100644 --- a/modules/luci-base/htdocs/luci-static/resources/luci.js +++ b/modules/luci-base/htdocs/luci-static/resources/luci.js @@ -2554,6 +2554,9 @@ * be found. */ data: function(node, key, val) { + if (!node || !node.getAttribute) + return null; + var id = node.getAttribute('data-idref'); /* clear all data */