Skip to content

Commit 5a2e141

Browse files
committed
Limit list constraints to a max of 13
1 parent d2ff7e9 commit 5a2e141

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/js/common.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,14 @@ function initializeSavedLists(){
215215
].filter(title => title !== el.textContent);
216216
}
217217
else {
218-
el.dataset.listConstraintActive = "true";
219-
el.classList.add('active');
220-
var listName = el.textContent;
221-
window.imTableConstraint['savedList'].push(listName)
218+
if(window.imTableConstraint['savedList'].length === 13){
219+
window.alert('You can only select a max of 13 List Contraints')
220+
} else{
221+
el.dataset.listConstraintActive = "true";
222+
el.classList.add('active');
223+
var listName = el.textContent;
224+
window.imTableConstraint['savedList'].push(listName)
225+
}
222226
}
223227
});
224228
});

0 commit comments

Comments
 (0)