projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
888be19
)
luci-base: luci.js: L.dom.data(): gracefully handle non-node argument
author
Jo-Philipp Wich
<jo@mein.io>
Fri, 14 Feb 2020 07:40:15 +0000
(08:40 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Fri, 14 Feb 2020 07:40:15 +0000
(08:40 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/luci.js
b/modules/luci-base/htdocs/luci-static/resources/luci.js
index 2cb346c81b8276bcb264f0409dc47426c4be3ddb..8d056ec03d3e7d9afcdaa6dbe1b1ee0181e25882 100644
(file)
--- 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 */