From 814677f3b0a9e472328786a24e0ab6c089254f1b Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Mon, 4 Jul 2016 20:09:43 -0700 Subject: [PATCH] lint --- app/hyperterm.js | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/app/hyperterm.js b/app/hyperterm.js index 3b362d0f..145919d8 100644 --- a/app/hyperterm.js +++ b/app/hyperterm.js @@ -270,33 +270,29 @@ export default class HyperTerm extends Component { } changeFontSize (value) { - const uid = this.state.sessions[this.state.active]; - const term = this.refs[`term-${uid}`]; - if (term) { - try { - const size = term.term.prefs_.get('font-size'); - term.term.prefs_.set('font-size', size + value); - } catch (e) { - alert(e); - } - } + const uid = this.state.sessions[this.state.active]; + const term = this.refs[`term-${uid}`]; + if (term) { + const size = term.term.prefs_.get('font-size'); + term.term.prefs_.set('font-size', size + value); + } } resetFontSize () { - const uid = this.state.sessions[this.state.active]; - const term = this.refs[`term-${uid}`]; - if (term) { - //TODO: once we have preferences, we need to read from it - term.term.prefs_.set('font-size', 12); - } + const uid = this.state.sessions[this.state.active]; + const term = this.refs[`term-${uid}`]; + if (term) { + // TODO: once we have preferences, we need to read from it + term.term.prefs_.set('font-size', 12); + } } increaseFontSize () { - this.changeFontSize(1); + this.changeFontSize(1); } decreaseFontSize () { - this.changeFontSize(-1); + this.changeFontSize(-1); } onSessionExit ({ uid }) { @@ -451,7 +447,9 @@ export default class HyperTerm extends Component { } else { // http://www.quirksmode.org/dom/events/click.html // https://en.wikipedia.org/wiki/Double-click - this.clickTimer = setTimeout(() => this.clicks = 0, 500); + this.clickTimer = setTimeout(() => { + this.clicks = 0; + }, 500); } }