Handle cases where a field don't have params
parent
80a80aef7a
commit
09c6d5c4f8
|
@ -193,12 +193,14 @@ H5P.ContentUpgradeProcess = (function (Version) {
|
|||
else {
|
||||
// Go through all fields in the group
|
||||
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) {
|
||||
params[subField.name] = upgradedParams;
|
||||
}
|
||||
next(err);
|
||||
});
|
||||
|
||||
}, function (err) {
|
||||
done(err, params);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue