unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] cuirass: check for null on specification edition page.
@ 2024-06-09 16:00 Jaming
  2024-06-17 13:01 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Jaming @ 2024-06-09 16:00 UTC (permalink / raw)
  To: guix-devel@gnu.org

From a5a99b1a7f930614bd88cadfe7a3470805403d48 Mon Sep 17 00:00:00 2001
From: Justin Martin <jaming@protonmail.com>
Date: Sun, 9 Jun 2024 11:20:25 -0400
Subject: [PATCH] cuirass: check for null on specification edition page.

* src/static/js/cuirass.js: check '.remove-channel' for null.
---
 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');
--
2.45.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cuirass: check for null on specification edition page.
  2024-06-09 16:00 [PATCH] cuirass: check for null on specification edition page Jaming
@ 2024-06-17 13:01 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2024-06-17 13:01 UTC (permalink / raw)
  To: Jaming; +Cc: guix-devel@gnu.org

Hi,

Jaming <jaming@protonmail.com> skribis:

> From a5a99b1a7f930614bd88cadfe7a3470805403d48 Mon Sep 17 00:00:00 2001
> From: Justin Martin <jaming@protonmail.com>
> Date: Sun, 9 Jun 2024 11:20:25 -0400
> Subject: [PATCH] cuirass: check for null on specification edition page.
>
> * src/static/js/cuirass.js: check '.remove-channel' for null.

Applied, thanks!

Ludo’.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-17 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-09 16:00 [PATCH] cuirass: check for null on specification edition page Jaming
2024-06-17 13:01 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).