mirror of
https://github.com/keeweb/keeweb.git
synced 2024-06-20 06:56:40 +02:00
shorter notation
This commit is contained in:
parent
d64eb95388
commit
b1e0056a3a
|
@ -21,8 +21,7 @@ const DefaultProperties = {
|
|||
|
||||
class FileInfoModel extends Model {
|
||||
constructor(data) {
|
||||
data = { ...data };
|
||||
data = pick(data, Object.keys(DefaultProperties));
|
||||
data = pick({ ...data }, Object.keys(DefaultProperties));
|
||||
for (const [key, val] of Object.entries(data)) {
|
||||
if (/Date$/.test(key)) {
|
||||
data[key] = val ? new Date(val) : null;
|
||||
|
|
Loading…
Reference in New Issue
Block a user