diff options
Diffstat (limited to 'sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts b/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts index 43c483fe8..c8b247832 100644 --- a/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts +++ b/sdnr/wt/odlux/apps/helpApp/src/services/helpService.ts @@ -28,7 +28,7 @@ class HelpService { if (this.documents[path]) return Promise.resolve(this.documents[path]); // request the document - const result = await requestRest<string>(`/help/${ path }`.replace(/\/{2,}/i, '/')); + const result = await requestRest<string>(`/help/${path}`.replace(/\/{2,}/i, '/')); if (result) { this.documents[path] = result; } @@ -41,9 +41,9 @@ class HelpService { // request the table of contents const result = await requestRest<TocNodeCollection>('/help/?meta', undefined, false); - if (result !== false) { + if (result !== null) { const mapNodesCollection = (col: TocNodeCollection): TocTreeNode[] => { - return Object.keys(col).reduce <TocTreeNode[]>((acc, key) => { + return Object.keys(col).reduce<TocTreeNode[]>((acc, key) => { const current = col[key]; acc.push({ id: key, @@ -57,7 +57,7 @@ class HelpService { this.tocNodeCollection = result && mapNodesCollection(result); } - return this.tocNodeCollection || null; + return this.tocNodeCollection || null; } } |