# Dumb question about editing a node

**URL:** <https://discourse.nodered.org/t/dumb-question-about-editing-a-node/34434>\
**Category:** General\
**Created:** [18 October 2020 04:20 UTC](https://discourse.nodered.org/t/dumb-question-about-editing-a-node/34434 "2020-10-18T04:20:46Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [19 October 2020 21:10 UTC](https://discourse.nodered.org/t/dumb-question-about-editing-a-node/34434/23 "2020-10-19T21:10:25Z")

</div>

> [@hepcat72](#):
>
> the client being "server.js"

To be honest I had a quick look at your node, but it is not clear to me how it works. Have been investigating a lot of nodes in the last years, and they all have a rather similar setup. But not the one you have forked. A bit too confusing for me after a heavy day at work ...

> [@hepcat72](#):
>
> the oneditprepare stuff is running on the browser

Yes that is executed when you open the edit panel of your node, so in the flow editor (client).

> [@hepcat72](#):
>
> `location.js` currently has:

It has an endpoint, so it is server side...

> [@hepcat72](#):
>
> My colleague suggested adding a breakpoint and stepping through things. I've only ever done that with java code before.

If you want to start debugging your client side nodes, you can easily get started via the chrome debugger (see my tutorial [here](https://discourse.nodered.org/t/debug-js-code-inside-function-node/26925/14)). For your client side code, you can start the developer tools when the flow editor is open (after you have added a `debugger` statement e.g. to your oneditprepare function...).

> [@hepcat72](#):
>
> it never executes because circles.length is null.

From your code from yesterday:

```auto
life360.circles(session)
                .then(...

```

circles is a promise and not an array, so it has no length.

If I were you I would read a book about Javascript, and start developing/forking a less complex node. And then continue with this node. Otherwise this will become a very long discussion ...

---

_[View the full topic](https://discourse.nodered.org/t/dumb-question-about-editing-a-node/34434)._
