From 5a39c164372904910a45baa183d3de66a6b4afb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20Sandstr=C3=B6m?= Date: Thu, 24 Sep 2015 22:43:27 +0200 Subject: [PATCH] fixed lint --- src/more-infos/more-info-alarm_control_panel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/more-infos/more-info-alarm_control_panel.js b/src/more-infos/more-info-alarm_control_panel.js index 8230effa2d..443eafa2e6 100644 --- a/src/more-infos/more-info-alarm_control_panel.js +++ b/src/more-infos/more-info-alarm_control_panel.js @@ -52,11 +52,11 @@ export default new Polymer({ }, }, validate_code(code) { - if(this.code_format == null){ + const re = new RegExp(this.code_format); + if (this.code_format === null) { this.code_valid = true; return; } - var re = new RegExp(this.code_format); this.code_valid = re.test(code); }, entered_code_changed(ev) { @@ -66,7 +66,7 @@ export default new Polymer({ if (newVal) { this.code_format = newVal.attributes.code_format; this.validate_code(this.entered_code); - this.code_input_visible = newVal.attributes.code_format != null; + this.code_input_visible = newVal.attributes.code_format !== null; this.code_input_enabled = (newVal.state === 'armed_home' || newVal.state === 'armed_away' || newVal.state === 'disarmed'); this.disarm_button_enabled = (newVal.state === 'armed_home' || newVal.state === 'armed_away'); this.arm_home_button_enabled = newVal.state === 'disarmed';