Handle cases where a field don't have params
parent
80a80aef7a
commit
09c6d5c4f8
|
@ -193,12 +193,14 @@ H5P.ContentUpgradeProcess = (function (Version) {
|
||||||
else {
|
else {
|
||||||
// Go through all fields in the group
|
// Go through all fields in the group
|
||||||
asyncSerial(field.fields, function (index, subField, next) {
|
asyncSerial(field.fields, function (index, subField, next) {
|
||||||
self.processField(subField, params[subField.name], function (err, upgradedParams) {
|
var paramsToProcess = params ? params[subField.name] : null;
|
||||||
|
self.processField(subField, paramsToProcess, function (err, upgradedParams) {
|
||||||
if (upgradedParams) {
|
if (upgradedParams) {
|
||||||
params[subField.name] = upgradedParams;
|
params[subField.name] = upgradedParams;
|
||||||
}
|
}
|
||||||
next(err);
|
next(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
done(err, params);
|
done(err, params);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue