Преглед на файлове

added explanatory comment

lindhork преди 4 години
родител
ревизия
0801a2fbc4
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      client/components/cards/cardCustomFields.js

+ 2 - 1
client/components/cards/cardCustomFields.js

@@ -121,7 +121,8 @@ CardCustomField.register('cardCustomField');
       {
         'submit .js-card-customfield-currency'(event) {
           event.preventDefault();
-          const value = Number(this.find('input').value.replace(/,/i,'.'), 10);
+          // To allow input separated by comma, the comma is replaced by a period.
+          const value = Number(this.find('input').value.replace(/,/i, '.'), 10);
           this.card.setCustomField(this.customFieldId, value);
         },
       },