From dd02ac4253e5c3c1cccc1e47d58691d699ab4731 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Wed, 27 Dec 2023 08:49:16 +0100 Subject: [PATCH] bugfix --- view-webapp/src/main/webapp/js/domhelper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/view-webapp/src/main/webapp/js/domhelper.js b/view-webapp/src/main/webapp/js/domhelper.js index 148954f..e2c54d8 100644 --- a/view-webapp/src/main/webapp/js/domhelper.js +++ b/view-webapp/src/main/webapp/js/domhelper.js @@ -47,6 +47,7 @@ Element.prototype.toggleClass = function(className) { return this; } NodeList.prototype.hasClass = function(className) { + if (this.length === 0) return false; return this.item(0).classList.contains(className); } Element.prototype.hasClass = function(className) {