So, found a javascript fix for this … I just wrapped the selector variable within a conditional statement:
if(document.getElementById("carousel")){
const mySiema = new Siema({
selector: '.siema',
},
});
} else {
console.log("Siema does not exist");
}