From 95033370c720244fcc0ed07a55a93bbbbd1cc0d4 Mon Sep 17 00:00:00 2001 From: Miguel Andrade Date: Tue, 4 Dec 2018 18:10:46 +0000 Subject: [PATCH] fix changing paper-input value to empty string --- addon/components/paper-input.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addon/components/paper-input.js b/addon/components/paper-input.js index e3dde68b7..3c45dbbbf 100644 --- a/addon/components/paper-input.js +++ b/addon/components/paper-input.js @@ -159,7 +159,10 @@ export default Component.extend(FocusableMixin, ColorMixin, ChildMixin, Validati }, setValue(value) { - if (this.element.querySelector('input, textarea').value !== value && value) { + // normalize falsy values to empty string + value = isEmpty(value) ? '' : value; + + if (this.element.querySelector('input, textarea').value !== value) { this.element.querySelector('input, textarea').value = value; } },