Skip to content

Commit

Permalink
dont allow more than 8 panes
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed Jan 30, 2025
1 parent 599af2b commit 43104df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ addEventListener(
document.getElementById('add-pane-button').addEventListener('click', () => {
if (!session) return;
const documents = session.getDocuments();
if (documents.length >= 8) {
console.error('cannot add more than 8 panes');
return;
}
const newDocs = [
...documents.map((doc) => ({ id: doc.id, target: doc.target })),
{ id: String(documents.length + 1), target: 'strudel' },
Expand Down

0 comments on commit 43104df

Please sign in to comment.