Skip to content

Commit

Permalink
fix selected sheet logic
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-saland committed Jan 23, 2024
1 parent 502f607 commit e523908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion how-to/integration-excel/client/src/excel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ async function populateWorksheets(): Promise<void> {
* @param name The name of worksheet to select.
*/
async function selectWorksheet(name: string): Promise<void> {
if (openWorksheets && selectedWorksheetIndex === undefined) {
if (openWorksheets) {
const newWorksheetIndex = openWorksheets.findIndex((w) => w.name === name);

if (newWorksheetIndex !== selectedWorksheetIndex) {
Expand Down

0 comments on commit e523908

Please sign in to comment.