diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-02-14 08:40:15 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-02-14 08:40:15 +0100 |
commit | 308215ca156212ad2a632b31179c2284a59a8556 (patch) | |
tree | 9bb217796f9e10847b7c32c0219a7c61a9448111 | |
parent | 888be193bdfd99e6f8f3af9357e5b8f9d67047e2 (diff) |
luci-base: luci.js: L.dom.data(): gracefully handle non-node argument
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/luci.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 2cb346c81b..8d056ec03d 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 */ |