From 6afbcb44a1e04277e00202eeab0c9d936eeb8194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sat, 25 Mar 2017 10:26:45 +0100 Subject: [PATCH] delete array comprehesion --- kfet/static/kfet/js/kpsul.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kfet/static/kfet/js/kpsul.js b/kfet/static/kfet/js/kpsul.js index b6c7e4a6..6052ad56 100644 --- a/kfet/static/kfet/js/kpsul.js +++ b/kfet/static/kfet/js/kpsul.js @@ -344,11 +344,10 @@ class CheckoutSelection { this._init_events(); - this.choices = [ - for (option of this._$input.find('option')) - if ($(option).attr('value') != '') - parseInt($(option).attr('value')) - ]; + this.choices = this._$input.find('option[value!=""]').toArray() + .map(function(opt) { + return parseInt($(opt).attr('value')); + }); } _init_events() {