0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-20 22:52:46 -05:00

fix: migration issue with old storage #740

time field is not present on some old storage, this will add the time field when a package is published
This commit is contained in:
Juan Picado @jotadeveloper 2018-06-07 07:52:19 +02:00
parent b26f80f062
commit e977d50c8a
No known key found for this signature in database
GPG key ID: 18AC54485952D158

View file

@ -239,6 +239,12 @@ class LocalStorage implements IStorage {
}
let currentDate = new Date().toISOString();
// some old storage do not have this field #740
if (_.isNil(data.time)) {
data.time = {};
}
data.time['modified'] = currentDate;
if (('created' in data.time) === false) {