1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Ensure GitHub and GitLab savers use a default path of / if empty

The empty string gets a slash appended further down this method.
This commit is contained in:
Jeremy Ruston 2020-01-30 17:02:14 +00:00
parent 5d0e4732b2
commit 3eacdc19fd
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ GitHubSaver.prototype.save = function(text,method,callback) {
username = this.wiki.getTiddlerText("$:/GitHub/Username"),
password = $tw.utils.getPassword("github"),
repo = this.wiki.getTiddlerText("$:/GitHub/Repo"),
path = this.wiki.getTiddlerText("$:/GitHub/Path"),
path = this.wiki.getTiddlerText("$:/GitHub/Path",""),
filename = this.wiki.getTiddlerText("$:/GitHub/Filename"),
branch = this.wiki.getTiddlerText("$:/GitHub/Branch") || "master",
endpoint = this.wiki.getTiddlerText("$:/GitHub/ServerURL") || "https://api.github.com",

View File

@ -25,7 +25,7 @@ GitLabSaver.prototype.save = function(text,method,callback) {
username = this.wiki.getTiddlerText("$:/GitLab/Username"),
password = $tw.utils.getPassword("gitlab"),
repo = this.wiki.getTiddlerText("$:/GitLab/Repo"),
path = this.wiki.getTiddlerText("$:/GitLab/Path"),
path = this.wiki.getTiddlerText("$:/GitLab/Path",""),
filename = this.wiki.getTiddlerText("$:/GitLab/Filename"),
branch = this.wiki.getTiddlerText("$:/GitLab/Branch") || "master",
endpoint = this.wiki.getTiddlerText("$:/GitLab/ServerURL") || "https://gitlab.com/api/v4",