I’m having some issues figuring out why I’m getting this error. The Code is working as intended but I’m getting the following error.
Here is my Code -
$w.onReady(function () {
$w('#dynamicDataset').onReady( () => {
$w('#repeater1').onItemReady(() => {
$w('#repeater1').forEachItem(($i, data, i) => {
if( data.primaryColor === null)
{
$i('#box2').style.backgroundColor = "#05136f";
}
else
{
$i('#box2').style.backgroundColor = data.primaryColor;
}
if( data.secondaryColor === null)
{
$i('#box3').style.backgroundColor = "#f0f0f0";
}
else
{
$i('#box3').style.backgroundColor = data.secondaryColor;
}
});
});
});
});
Not sure what I’m doing wrong here, any help is greatly appreciated.