Checked null & undefined in settings migration (#10609)

no-issue

This is to make sure we catch all falsy cases of values.
This commit is contained in:
Fabien O'Carroll 2019-03-13 23:35:23 +01:00 committed by GitHub
parent 02c56e90e5
commit ca16b197a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ module.exports.up = (options) => {
}
// @NOTE: null or undefined were obviously intended to be false
if (entry.value === 'null' || entry.value === 'undefined') {
if (entry.value === null || entry.value === undefined || entry.value === 'null' || entry.value === 'undefined') {
const value = 'false';
common.logging.info(`Setting ${entry.key} to ${value} because it was ${entry.value}`);