Skip to content

Commit

Permalink
fix: better null check
Browse files Browse the repository at this point in the history
  • Loading branch information
kometenstaub committed Mar 31, 2022
1 parent a3fef52 commit 1da3fee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Expand Up @@ -51,7 +51,7 @@ export default class OpenSyncHistoryPlugin extends Plugin {
): Command['checkCallback'] {
return (checking: boolean): boolean => {
const tfile: TFile | null = this.app.workspace.getActiveFile();
if (tfile !== null) {
if (tfile) {
if (!checking) {
fn(tfile);
}
Expand Down

0 comments on commit 1da3fee

Please sign in to comment.