Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at toggleCategorySelection ((index):142:37)
at init ((index):152:17)
at HTMLDocument. ((index):137:17)
at e (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3-RC2:2:26990)
at t (load-scripts.php?c=1&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3-RC2:2:27292)
function toggleCategorySelection(element) {
if ($(element).val().indexOf('category') !== -1) {
$('#expired-category-selection').show();
$('#expired-category-wrapper').show();
} else {
$('#expired-category-selection').hide();
$('#expired-category-wrapper').hide();
}
Step to replicate: