mikeconley / myqonly

A tool for Mozillians who want to know how many reviews are in their queue in their browser.
Mozilla Public License 2.0
11 stars 13 forks source link

Fixes #37 - save falsy checkbox values #38

Closed dblohm7 closed 4 years ago

dblohm7 commented 4 years ago

The code in _initServices() uses undefined as expected -- to indicate that a field doesn't exist. OTOH, when onUpdateService saves unchecked checkboxes, it deletes their value from settings, which also results in undefined.

This patch changes that code such that a newValue of undefined does indeed delete the value of the setting, but a falsy newValue is still written to the settings.