2

I've never seen anything like this before. I have an object called action containing 3 properties (actionType, faxNumber and guid).

I do console.log('action=', action, 'guid=', action.guid) and get:

action = AutomationActionFax {__ob__: Observer}
   actionType: "fax",
   faxNumber: null,
   guid: "JHANQK1MQ",

guid = null <-- WTF???

How is is possible to see the property guid on the action set to JHANQK1MQ, then ask for action.guid in the same statement and have it return null?

rmirabelle
  • 6,268
  • 7
  • 45
  • 42
  • can you attach the code block where you ve added the console statement? – Amaarockz Oct 01 '21 at 16:06
  • Please keep in mind the objects might have the latest state in console. Try to output it using `JSON.stringify` – Anatoly Oct 01 '21 at 17:57
  • @Anatoly do you mean the objects might NOT have the latest state in the console? If I `JSON.stringify` the `action`, indeed it outputs `guid = null`. How on Earth is this even possible? How can the output of stringify NOT match the object being stringified? – rmirabelle Oct 01 '21 at 19:36
  • 1
    Interesting, I think this answer explains the why. https://stackoverflow.com/a/8249333/1598935 – Daniel Oct 01 '21 at 20:55
  • Exactly what I meant – Anatoly Oct 01 '21 at 22:46

0 Answers0