# 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:** 59

<div class="post-metadata">

**Author:** ![hepcat72](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hepcat72/32/8078_2.png) [@hepcat72](https://discourse.nodered.org/u/hepcat72)\
**Post date:** [30 October 2020 21:50 UTC](https://discourse.nodered.org/t/dumb-question-about-editing-a-node/34434/59 "2020-10-30T21:50:41Z")

</div>

OK. It looks like I need to add code like this to the location node:

```auto
this.on('close', function(removed, done) {
    if (removed) {
        // This node has been disabled/deleted
    } else {
        // This node is being restarted
    }
    done();
});

```

However, I'm not sure how to identify the correct callback function to remove from the array in the server node... I suppose instead of an array of functions, I would create a hash, but what identifier for a location node can I send when adding the callback function? Is `node.id` a thing?

---

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