use type parameter to type check in assim rather than tags

This commit is contained in:
Tom Odem 2024-05-26 12:06:51 -07:00
parent 8de8b4eb29
commit acfbcc1772

View File

@ -104,13 +104,17 @@ const assimilator = ({
//find if the current deployedWidget is the same widget type as the proposed widget
let sameWidget = true;
widget.tags!.forEach((tag) => {
//go through every tag in the proposed wigets tags
if (!deployedWidget.tags!.includes(tag)) {
//check if the tags are in the current deployed widget
sameWidget = false; //the current tag was not in the current deployed widget, so it is not the same widget type
}
});
if(widget.type != deployedWidget.type){
sameWidget = false;
}
// widget.tags!.forEach((tag) => {
// //go through every tag in the proposed wigets tags
// if (!deployedWidget.tags!.includes(tag)) {
// //check if the tags are in the current deployed widget
// sameWidget = false; //the current tag was not in the current deployed widget, so it is not the same widget type
// }
// });
if (sameWidget) {
//the current deployed widget is the same widget type