fix: await/void revealLeaf promise to satisfy minAppVersion check

This commit is contained in:
gearheaded 2026-06-21 18:50:40 -04:00
parent 73773014e9
commit 4ad9bd1227
5 changed files with 14 additions and 7 deletions

View file

@ -1181,13 +1181,13 @@ var GitHubContributionsPlugin = class extends import_obsidian.Plugin {
async activateView() {
const existing = this.app.workspace.getLeavesOfType(VIEW_TYPE);
if (existing.length > 0) {
this.app.workspace.revealLeaf(existing[0]);
void this.app.workspace.revealLeaf(existing[0]);
return;
}
const leaf = this.app.workspace.getRightLeaf(false);
if (leaf) {
await leaf.setViewState({ type: VIEW_TYPE, active: true });
this.app.workspace.revealLeaf(leaf);
void this.app.workspace.revealLeaf(leaf);
}
}
async loadSettings() {

View file

@ -1,7 +1,7 @@
{
"id": "github-contributions",
"name": "GitHub Contributions",
"version": "1.0.4",
"version": "1.0.5",
"minAppVersion": "1.0.0",
"description": "View GitHub and local Git contributions directly in the sidebar with streak tracking, repository breakdowns, color palettes, and daily note integration.",
"author": "gearheaded",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-github-contributions",
"version": "1.0.4",
"version": "1.0.5",
"description": "GitHub contribution graph for Obsidian",
"main": "main.js",
"scripts": {

View file

@ -1556,9 +1556,15 @@ export default class GitHubContributionsPlugin extends Plugin {
async activateView() {
const existing = this.app.workspace.getLeavesOfType(VIEW_TYPE);
if (existing.length > 0) { this.app.workspace.revealLeaf(existing[0]); return; }
if (existing.length > 0) {
void this.app.workspace.revealLeaf(existing[0]);
return;
}
const leaf = this.app.workspace.getRightLeaf(false);
if (leaf) { await leaf.setViewState({ type: VIEW_TYPE, active: true }); this.app.workspace.revealLeaf(leaf); }
if (leaf) {
await leaf.setViewState({ type: VIEW_TYPE, active: true });
void this.app.workspace.revealLeaf(leaf);
}
}
async loadSettings() {

View file

@ -3,5 +3,6 @@
"1.0.1": "0.15.0",
"1.0.2": "0.15.0",
"1.0.3": "1.0.0",
"1.0.4": "1.0.0"
"1.0.4": "1.0.0",
"1.0.5": "1.0.0"
}