Skip to content

Commit

Permalink
generator: Fix last section navigation
Browse files Browse the repository at this point in the history
Change `<` to `<=` so that the last section can be reached.
  • Loading branch information
tahini committed Apr 8, 2024
1 parent 7fc4ab8 commit b853864
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def generate_section_configs(excel_file_path: str):
# Generate code for section
def generate_section_code(previousSection, nextSection):
ts_section_code = "" # TypeScript code for the section

# TODO: Do this with survey_folder_path
# Get section output file
section_output_file = (
Expand Down Expand Up @@ -107,7 +106,7 @@ def generate_section_code(previousSection, nextSection):

# Generate nextSectionName
# Check if there is a next row
if row_number < len(rows) - 1:
if row_number <= len(rows) - 1:
next_row = rows[row_number] # Get the next row
# Get the next section from the next row
nextSection = get_values_from_row(next_row, headers)[0]
Expand Down

0 comments on commit b853864

Please sign in to comment.