Skip to content

Commit

Permalink
fix verNum being undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
GottZ committed Mar 23, 2024
1 parent cab92a6 commit 66ef459
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 that = this;
return {
get current() {
return version;
return that.verNum;
},
compare: (op: CompareOperator, ver: string) => compare(version, ver, op),
satisfies: (range: string) => satisfies(version, range),
compare: (op: CompareOperator, ver: string) => compare(that.verNum, ver, op),
satisfies: (range: string) => satisfies(that.verNum, range),
};
})();

Expand Down

0 comments on commit 66ef459

Please sign in to comment.