Skip to content

Commit

Permalink
[CHG] Adds suggestions from PR review. Closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
czottmann committed Sep 27, 2022
1 parent 2404fdf commit 1c4ed88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class CopySearchUrl extends Plugin {
}

private removeCopyUrlButton() {
this.button.parentNode?.removeChild(this.button);
this.button?.detach();
}

private isSearchDisabled() {
Expand All @@ -63,7 +63,7 @@ export default class CopySearchUrl extends Plugin {
}

private getSearchQuery() {
return (this.getSearchLeaf().view as SearchLeafView)?.getQuery();
return (<SearchLeafView> this.getSearchLeaf().view)?.getQuery() || "";
}

private getObsidianUrl() {
Expand Down

0 comments on commit 1c4ed88

Please sign in to comment.