This is an automated email from the git hooks/post-receive script.
civodul pushed a commit to branch main
in repository guix-cuirass.
The following commit(s) were added to refs/heads/main by this push:
new c8022d5 js: Check for null on specification edition page.
c8022d5 is described below
commit c8022d51f4c6c34c4ea0ce2d3502d4a683946888
Author: Justin Martin <[email protected]>
AuthorDate: Sun Jun 9 11:20:25 2024 -0400
js: Check for null on specification edition page.
* src/static/js/cuirass.js: check '.remove-channel' for null.
Signed-off-by: Ludovic Courtès <[email protected]>
---
src/static/js/cuirass.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/static/js/cuirass.js b/src/static/js/cuirass.js
index 4054256..42f28f1 100644
--- a/src/static/js/cuirass.js
+++ b/src/static/js/cuirass.js
@@ -247,8 +247,10 @@ ready(() => {
/* Specification edition page. */
(function(){
if (document.querySelector(".edit-channel") !== null) {
-
document.querySelector('.remove-channel').addEventListener('click', (e) =>
- e.target.parentNode.remove());
+ if (document.querySelector('.remove-channel') !== null) {
+
document.querySelector('.remove-channel').addEventListener('click', (e) =>
+ e.target.parentNode.remove());
+ }
document.querySelector('.add-channel').addEventListener('click',
(e) => {
var clone = document.querySelector('.channel').cloneNode(true);
clone.setAttribute('class', 'form-group row channel-new');