Describe the bug
In src/helpers/updateCheckPolicy.js:
appUpdatesEnabled({ notificationsEnabled, notifyUpdates } = {}) has default parameter = {}, which only triggers when the argument is undefined. When called with null or a non-object value, it throws:
TypeError: Cannot destructure property 'notificationsEnabled' of 'null' as it is null.
To Reproduce
- Call
appUpdatesEnabled(null) -> throws TypeError.
Expected Behavior
appUpdatesEnabled should safely handle null and non-object values, defaulting to true (check-by-default behavior) without throwing an error.
Describe the bug
In
src/helpers/updateCheckPolicy.js:appUpdatesEnabled({ notificationsEnabled, notifyUpdates } = {})has default parameter= {}, which only triggers when the argument isundefined. When called withnullor a non-object value, it throws:TypeError: Cannot destructure property 'notificationsEnabled' of 'null' as it is null.To Reproduce
appUpdatesEnabled(null)-> throwsTypeError.Expected Behavior
appUpdatesEnabledshould safely handlenulland non-object values, defaulting totrue(check-by-default behavior) without throwing an error.