Skip to content

Commit

Permalink
Merge pull request #1369 from ebkr/fix-config-editor-hasRange-check
Browse files Browse the repository at this point in the history
Changed hasRange to a getter as previous method does not exist when parsed back from JSON
  • Loading branch information
ebkr authored Jun 18, 2024
2 parents d56d50e + 59b0d5f commit ee438d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/model/file/ConfigLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ export default class ConfigLine {
this.range = this.parseRange();
}

public hasRange() {
public get hasRange() {
return this.range.length === 2;
}

public getMinRange() {
return this.hasRange() ? this.range[0] : 0;
return this.hasRange ? this.range[0] : 0;
}

public getMaxRange() {
return this.hasRange() ? this.range[1] : 0;
return this.hasRange ? this.range[1] : 0;
}

private parseRange(): number[] {
Expand Down

0 comments on commit ee438d0

Please sign in to comment.