Skip to content

Commit

Permalink
fix verNum being undefined (#2278)
Browse files Browse the repository at this point in the history
  • Loading branch information
GottZ authored Mar 23, 2024
1 parent cab92a6 commit b52a0c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/plugin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ export class DataviewApi {
compare: (op: CompareOperator, ver: string) => boolean;
satisfies: (range: string) => boolean;
} = (() => {
const { verNum: version } = this;
const self = this;
return {
get current() {
return version;
return self.verNum;
},
compare: (op: CompareOperator, ver: string) => compare(version, ver, op),
satisfies: (range: string) => satisfies(version, range),
compare: (op: CompareOperator, ver: string) => compare(this.verNum, ver, op),
satisfies: (range: string) => satisfies(this.verNum, range),
};
})();

Expand Down

0 comments on commit b52a0c6

Please sign in to comment.