mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Underscore.js _.map() to native Array.map() (optional with Object.entries/values)
This commit is contained in:
parent
032fa8c736
commit
a82575a830
27 changed files with 68 additions and 78 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
import { isUnd } from 'Common/Utils';
|
||||
import { AbstractComponent } from 'Component/Abstract';
|
||||
|
|
@ -21,7 +20,7 @@ class AbstractRadio extends AbstractComponent {
|
|||
this.readOnly = isUnd(params.readOnly) ? false : !!params.readOnly;
|
||||
|
||||
if (params.values) {
|
||||
this.values(_.map(params.values, (label, value) => ({ label: label, value: value })));
|
||||
this.values(Object.entries(params.values).map((label, value) => ({ label: label, value: value })));
|
||||
}
|
||||
|
||||
this.click = this.click.bind(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue