Skip to content

Commit

Permalink
Merge pull request guardian#4181 from bbc/t1578-regression-adding-labels
Browse files Browse the repository at this point in the history
fix regression bug when adding labels/people to collection of images
  • Loading branch information
paperboyo authored Nov 3, 2023
2 parents b3046be + 525f486 commit 08d52d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kahuna/public/js/edits/list-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ listEditor.controller('ListEditorCtrl', [

//-clear removed list-
let ctrlElementName = ctrl.elementNamePlural ? ctrl.elementNamePlural : ctrl.elementName;
if (removedElements.length > 0 && ctrlElementName === elementName) {
if (removedElements && removedElements.length > 0 && ctrlElementName === elementName) {
ctrl.images.forEach(img => {
if (img.uri === originatingImage) {
ctrl.imageRemovedElements = [];
Expand Down

0 comments on commit 08d52d4

Please sign in to comment.