Made changes to structure of upgrades.js. Makes it possible in the future to add stuff for a upgrade
parent
ebbd4c8fc1
commit
d3cd7aced4
|
@ -361,11 +361,16 @@ var H5PUpgrades = H5PUpgrades || {};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// We found an upgrade hook, run it
|
// We found an upgrade hook, run it
|
||||||
upgrade(params, function (err, upgradedParams) {
|
if (upgrade.contentUpgrade !== undefined && typeof upgrade.contentUpgrade === 'function') {
|
||||||
|
upgrade.contentUpgrade(params, function (err, upgradedParams) {
|
||||||
params = upgradedParams;
|
params = upgradedParams;
|
||||||
nextMinor(err);
|
nextMinor(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
nextMinor(info.errorScript.replace('%lib', library.name + ' ' + newVersion));
|
||||||
|
}
|
||||||
|
}
|
||||||
}, nextMajor);
|
}, nextMajor);
|
||||||
}
|
}
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
|
|
Loading…
Reference in New Issue