Skip to content

Commit

Permalink
Crash on reading plan book selected (sillsdev#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmoore1 authored Jan 24, 2025
1 parent 8dbe87c commit cab32a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/components/ScriptureViewSofria.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,8 @@ LOGGING:
}
function preprocessAction(action: string, workspace: any) {
// Table ends if row ended and anything other than start row follows it
if (!workspace.inRow && workspace.inTable && !(action === 'startRow')) {
workspace.inTable = false;
if (!workspace.inRow && workspace.insideTable && !(action === 'startRow')) {
workspace.insideTable = false;
workspace.root.appendChild(workspace.tableElement);
}
}
Expand Down Expand Up @@ -1399,7 +1399,7 @@ LOGGING:
workspace.lastPhraseTerminated = false;
workspace.currentVideoIndex = 0;
workspace.chapterNumText = '';
workspace.inTable = false;
workspace.insideTable = false;
workspace.inRow = false;
workspace.tableElement = null;
workspace.tableRowElement = null;
Expand Down Expand Up @@ -2369,10 +2369,10 @@ LOGGING:
console.log('Start Row %o', context.sequences[0].element);
}
preprocessAction('startRow', workspace);
if (!workspace.inTable) {
if (!workspace.insideTable) {
workspace.tableElement = document.createElement('table');
workspace.tableElement.setAttribute('cellpadding', '5');
workspace.inTable = true;
workspace.insideTable = true;
}
workspace.inRow = true;
workspace.tableRowElement = document.createElement('tr');
Expand Down

0 comments on commit cab32a1

Please sign in to comment.