Enable & Remove a darkmode class

0
When I run this app and hit the switch which triggers this nanoflow & Java action i get an error message on the console from the Client log node that the Javascript action was not implemented. Any suggestions on how to get this working properly?
asked
2 answers
1

Remove line 26

answered
-1

In this function, it will resolve to either the classList.add or the classList.remove code block due to the if-else statement.

But because you do not exit ('return;') the function when that is the case, it will always continue to the throw new Error line.

You should add a line with return; underneath both document.body.classList... lines so the function exits before it hits the throw new Error line

answered