Fix update script bug that was introduced with adding the hasmetadata field

pull/52/head
Oliver Tacke 2018-07-11 09:33:59 +02:00
parent a015d1a134
commit b1a01b728d
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ H5P.ContentUpgradeProcess = (function (Version) {
// Look for available upgrades // Look for available upgrades
var usedLib = params.library.split(' ', 2); var usedLib = params.library.split(' ', 2);
for (var i = 0; i < field.options.length; i++) { for (var i = 0; i < field.options.length; i++) {
var availableLib = field.options[i].split(' ', 2); var availableLib = (typeof field.options === 'string') ? field.options[i].split(' ', 2) : field.options[i].name.split(' ', 2);
if (availableLib[0] === usedLib[0]) { if (availableLib[0] === usedLib[0]) {
if (availableLib[1] === usedLib[1]) { if (availableLib[1] === usedLib[1]) {
return done(); // Same version return done(); // Same version