Skip to content

Commit 8bd4ee2

Browse files
committed
Type check ifxes
1 parent d154c59 commit 8bd4ee2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/webdoc-cli/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async function main(argv: yargs.Argv) {
7070
config.template.siteRoot = config.template.siteRoot.slice(1);
7171
}
7272
if (config.template.siteRoot.endsWith("/")) {
73-
config.template.siteRoot.length -= 1;
73+
config.template.siteRoot = config.template.siteRoot.slice(0, -1);
7474
}
7575

7676
// TODO: Fix what env/conf is?

packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function LinkerPluginShell() {
260260

261261
const rec = this.documentRegistry.get(doc.id);
262262

263-
fileUrl = rec ? this.processInternalURI(rec.uri) : this.getURI(doc);
263+
fileUrl = rec && rec.uri ? this.processInternalURI(rec.uri) : this.getURI(doc);
264264

265265
// Cache this query
266266
if (fileUrl) {
@@ -390,7 +390,7 @@ function LinkerPluginShell() {
390390
* @param {string} pathPrefix - The folder path inside which to place the document, if desired.
391391
* @return {string} The filename to use for the string.
392392
*/
393-
generateBaseURI(canonicalPath: string, pathPrefix = ""): string {
393+
generateBaseURI(canonicalPath: string, pathPrefix: string = ""): string {
394394
let seedURI = (canonicalPath || "")
395395
// use - instead of : in namespace prefixes
396396
// replace characters that can cause problems on some filesystems

0 commit comments

Comments
 (0)