diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eecfee2..c96823e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [7.0.1](https://github.com/obsidianMkdocs/obsidian-github-publisher/compare/7.0.0...7.0.1) (2024-02-26) + + +### Bug Fixes + +* return default key when not found ([df269d3](https://github.com/obsidianMkdocs/obsidian-github-publisher/commit/df269d3c25893a9a1f9282543c1584cfffd47589)) +* token not found when default repo is used ([c864f9b](https://github.com/obsidianMkdocs/obsidian-github-publisher/commit/c864f9befbca01352e77745aece6d02e6d2a76f2)) + ## [7.0.0](https://github.com/ObsidianPublisher/obsidian-github-publisher/compare/6.16.0-3...7.0.0) (2024-02-26) diff --git a/manifest-beta.json b/manifest-beta.json index 06e4c0cb..1f669004 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "obsidian-mkdocs-publisher", "name": "Github Publisher", - "version": "7.0.0", + "version": "7.0.1", "minAppVersion": "0.15.4", "description": "Github Publisher helps you to publish your notes on a preconfigured GitHub repository, for free, and more!", "author": "Mara-Li", diff --git a/manifest.json b/manifest.json index 18ac32e7..43fc3c4f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-mkdocs-publisher", "name": "Github Publisher", - "version": "7.0.0", + "version": "7.0.1", "minAppVersion": "0.15.4", "description": "Github Publisher helps you to publish your notes on a preconfigured GitHub repository, for free, and more!", "author": "Mara-Li", diff --git a/package-lock.json b/package-lock.json index 8f7d5176..ba4aa33d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "obsidian-github-publisher", - "version": "7.0.0", + "version": "7.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "obsidian-github-publisher", - "version": "7.0.0", + "version": "7.0.1", "license": "AGPL-3.0", "dependencies": { "@excalidraw/utils": "^0.1.2", diff --git a/package.json b/package.json index b0a4abe3..5ab0719a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-github-publisher", - "version": "7.0.0", + "version": "7.0.1", "description": "Github Publisher is a plugin that help you to send file in a configured Github Repository, based on a frontmatter entry state.", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index a2fe96b2..d75e2649 100644 --- a/src/main.ts +++ b/src/main.ts @@ -129,6 +129,7 @@ export default class GithubPublisher extends Plugin { */ async loadToken(repo?: string): Promise { + if (repo=="default") repo = undefined; const tokenPath = createTokenPath(this, this.settings.github.tokenPath); const tokenFileExists = await this.app.vault.adapter.exists(`${tokenPath}`); @@ -141,7 +142,7 @@ export default class GithubPublisher extends Plugin { const tokenJSON = JSON.parse(tokenFile); const defaultToken = tokenJSON.GITHUB_PUBLISHER_TOKEN; if (repo) - return tokenJSON.GITHUB_PUBLISHER_REPOS[repo] ?? defaultToken; + return tokenJSON.GITHUB_PUBLISHER_REPOS?.[repo] ?? defaultToken; return defaultToken; } if (tokenFile) {