luci-base: luci.js: L.dom.data(): gracefully handle non-node argument
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 308215ca15
)
This commit is contained in:
parent
2665c5fef8
commit
69445fa25f
1 changed files with 3 additions and 0 deletions
|
@ -2520,6 +2520,9 @@
|
|||
* be found.
|
||||
*/
|
||||
data: function(node, key, val) {
|
||||
if (!node || !node.getAttribute)
|
||||
return null;
|
||||
|
||||
var id = node.getAttribute('data-idref');
|
||||
|
||||
/* clear all data */
|
||||
|
|
Loading…
Reference in a new issue