Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== diff -u -r9aa697756d53159eb517ae2477c5b055a61a83c3 -r96b4477ba27be6b678e5b4e8e9f4303b3e1ad690 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 9aa697756d53159eb517ae2477c5b055a61a83c3) +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 96b4477ba27be6b678e5b4e8e9f4303b3e1ad690) @@ -197,8 +197,12 @@ allGroup.data('templates', allTemplates); $.each(learningLibraryGroups, function(){ - var templates = allTemplates.clone().appendTo(templateContainerCell), - learningLibraries = this.learningLibraries; + var learningLibraries = this.learningLibraries; + if (!learningLibraries) { + return true; + } + + var templates = allTemplates.clone().appendTo(templateContainerCell); // cloned everything, now remove ones that are not in the list $('.template', templates).each(function(){ var learningLibraryId = $(this).attr('learningLibraryId'),