I must be missing something obvious, can someone explain, please, how this code
const hasExtraProps = message => {
const allowed = ['_msgid', 'ui_update', 'class', 'visible', 'enabled']
console.log(`message: ${JSON.stringify(message)}`)
const keys = Object.keys(message)
console.log(`keys: ${JSON.stringify(keys)}`)
return keys.length > 0 && keys.some(key => !allowed.includes(key))
}
can show this in the log?
message: {"ui_update":{"color":"#E67E22"},"_msgid":"f047d5bf7047ad56"}
keys: ["ui_update","_msgid","payload"]
Where is the key "payload" coming from?