Skip to content

Commit cb41307

Browse files
committed
remove unnecessary boolean type from repo option
1 parent a042aca commit cb41307

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ window.$docsify = {
714714

715715
## repo
716716

717-
- Type: `false | String`
717+
- Type: `String`
718718

719719
Configure the repository url, or a string of `username/repo`, to add the [GitHub Corner](http://tholman.com/github-corners/) widget in the top right corner of the site.
720720

@@ -726,7 +726,7 @@ window.$docsify = {
726726
};
727727
```
728728

729-
If `false` or empty, no GitHub corner will be displayed.
729+
If undefined or empty, no GitHub corner will be displayed.
730730

731731
## requestHeaders
732732

src/core/config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const defaultDocsifyConfig = () => ({
5050
onlyCover: false,
5151
plugins: /** @type {Plugin[]} */ ([]),
5252
relativePath: false,
53-
repo: /** @type {boolean | string} */ (''),
53+
repo: /** @type {string} */ (''),
5454
requestHeaders: /** @type {Record<string, string>} */ ({}),
5555
routerMode: /** @type {'hash' | 'history'} */ 'hash',
5656
routes: /** @type {Record<string, string | RouteHandler>} */ ({}),
@@ -200,11 +200,6 @@ export default function (vm, config = {}) {
200200
config.coverpage = '_coverpage' + config.ext;
201201
}
202202

203-
// CONTINUE Why are we checking for `true` here and setting an empty string (which behaves the same as false)?
204-
if (config.repo === true) {
205-
config.repo = '';
206-
}
207-
208203
if (config.name === true) {
209204
config.name = '';
210205
}

0 commit comments

Comments
 (0)