From ae5f5ee96db1323c0f6426fe5c88286e87e4d212 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Wed, 29 Jan 2014 20:35:05 +0100 Subject: [PATCH] Factor out common variable in ol.dom.Input --- src/ol/dom/input.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ol/dom/input.js b/src/ol/dom/input.js index fb59399b17..e93fdc7c0c 100644 --- a/src/ol/dom/input.js +++ b/src/ol/dom/input.js @@ -116,10 +116,11 @@ goog.exportProperty( * @private */ ol.dom.Input.prototype.handleInputChanged_ = function() { - if (this.target_.type === 'checkbox' || this.target_.type === 'radio') { - this.setChecked(this.target_.checked); + var target = this.target_; + if (target.type === 'checkbox' || target.type === 'radio') { + this.setChecked(target.checked); } else { - this.setValue(this.target_.value); + this.setValue(target.value); } };