Skip to content

Commit b239437

Browse files
authored
Fix PnP init regression from e14cb87 (#3389)
This regressed with e14cb87 / #3385, which went live on Monday (2 days ago). 1. The base `PlanningSheet` class initializing `goalStart` 2. `goalColumn` was read, which read the `revisionCell` 3. `revisionCell` wasn't initialized yet, because it is defined in child classes. Switching `goalStart` to be lazy fixes this. It was also the only property in the base class that was eagerly initialized.
1 parent 05f35e0 commit b239437

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/pnp/planning-sheet.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ export abstract class PlanningSheet extends Sheet {
6565
return this.column('Q');
6666
}
6767

68-
get goals(): Range<PlanningSheet> {
68+
@Once() get goals(): Range<PlanningSheet> {
6969
return this.range(this.goalsStart, this.goalsEnd);
7070
}
71-
protected goalsStart = this.cell(this.goalColumn, 23);
71+
@Once() protected get goalsStart() {
72+
return this.cell(this.goalColumn, 23);
73+
}
7274
@Once() protected get goalsEnd() {
7375
return this.sheetRange.end.row.cell(this.goalColumn);
7476
}

0 commit comments

Comments
 (0)