# Object property becomes undefined

**URL:** https://discourse.nodered.org/t/object-property-becomes-undefined/50647
**Category:** Developing Nodes
**Created:** [5 September 2021 21:16 UTC](https://discourse.nodered.org/t/object-property-becomes-undefined/50647 "2021-09-05T21:16:09Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [5 September 2021 21:29 UTC](https://discourse.nodered.org/t/object-property-becomes-undefined/50647/2 "2021-09-05T21:29:31Z")

</div>

Try moving the function handleResult inside the node.on("input") and **don't** save a reference to msg (it should be in scope due to being an embedded function).

This should also avoid concurrency issues.

Alternatively, try cloning the msg as you assign it to the node variable before the call to probe.

---

_[View the full topic](https://discourse.nodered.org/t/object-property-becomes-undefined/50647)._
