add an extra check to ensure the pips exist before adding a class to them

This commit is contained in:
Jacob Overgaard
2022-09-21 14:59:54 +02:00
committed by Nikolaj
parent 4effe1d462
commit 3f6fc6f761
2 changed files with 8 additions and 2 deletions

View File

@@ -332,7 +332,10 @@ For extra details about options and events take a look here: https://refreshless
activePip[handle] = pip;
}
});
activePip[handle].classList.add("noUi-value-active");
if (activePip[handle]) {
activePip[handle].classList.add("noUi-value-active");
}
});
}
function addPipClickHandler(){

View File

@@ -64,7 +64,10 @@ angular.module("umbraco.install").controller("Umbraco.Install.UserController", f
activePip[handle] = pip;
}
});
activePip[handle].classList.add("noUi-value-active");
if (activePip[handle]) {
activePip[handle].classList.add("noUi-value-active");
}
});
$(consentSlider).on('$destroy', function () {