diff --git a/src/plugins/advanced_settings/public/management_app/lib/is_default_value.test.ts b/src/plugins/advanced_settings/public/management_app/lib/is_default_value.test.ts index 4cde8bf517499..c8a80bd3d6aab 100644 --- a/src/plugins/advanced_settings/public/management_app/lib/is_default_value.test.ts +++ b/src/plugins/advanced_settings/public/management_app/lib/is_default_value.test.ts @@ -50,9 +50,9 @@ describe('Settings', function () { }); describe('without a value', function () { - it('should return true', function () { + it('should return false for empty string but true for undefined', function () { expect(isDefaultValue({ ...setting, value: undefined })).to.be(true); - expect(isDefaultValue({ ...setting, value: '' })).to.be(true); + expect(isDefaultValue({ ...setting, value: '' })).to.be(false); }); }); diff --git a/src/plugins/advanced_settings/public/management_app/lib/is_default_value.ts b/src/plugins/advanced_settings/public/management_app/lib/is_default_value.ts index 53c2ef3187f09..080aee369dc0f 100644 --- a/src/plugins/advanced_settings/public/management_app/lib/is_default_value.ts +++ b/src/plugins/advanced_settings/public/management_app/lib/is_default_value.ts @@ -22,7 +22,6 @@ export function isDefaultValue(setting: FieldSetting) { return ( setting.isCustom || setting.value === undefined || - setting.value === '' || String(setting.value) === String(setting.defVal) ); }