The || operator is a boolean OR.
The ?? operator is a null/underfined detector.
The code uses || instead of ?? at several locations.
Result:
Writing (msg.autoWakeup || config.autoWakeup || false) gives true when at least one the expression is true (last expression is useless BTW)
It should be (msg.autoWakeup ?? config.autoWakeup ?? false) meaning "msg.autoWakeup if set, otherwise config.autoWakeup if set, otherwise false"
The || operator is a boolean OR. The ?? operator is a null/underfined detector.
The code uses || instead of ?? at several locations. Result: Writing (msg.autoWakeup || config.autoWakeup || false) gives true when at least one the expression is true (last expression is useless BTW)
It should be (msg.autoWakeup ?? config.autoWakeup ?? false) meaning "msg.autoWakeup if set, otherwise config.autoWakeup if set, otherwise false"