Skip to content

Commit

Permalink
Fix tree version
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski authored and horner committed Sep 7, 2023
1 parent 19200f8 commit 74f4d1b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/containers/transform/MarkdownTreeProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {FileContentService} from '../../utils/FileContentService';
import {TreeItem} from '../../model/TreeItem';
import {DirectoryScanner, RESERVED_NAMES} from './DirectoryScanner';
import {MimeTypes} from '../../model/GoogleFile';
import {FileId} from '../../model/model';
import { FileContentService } from '../../utils/FileContentService';
import { TreeItem } from '../../model/TreeItem';
import { DirectoryScanner, RESERVED_NAMES } from './DirectoryScanner';
import { MimeTypes } from '../../model/GoogleFile';
import { FileId } from '../../model/model';

type CallBack<K> = (treeItem: K) => boolean;

export type TreeItemTuple = [ TreeItem?, string? ];
export type TreeItemTuple = [TreeItem?, string?];

export class MarkdownTreeProcessor {
private driveTree: TreeItem[] = [];
Expand Down Expand Up @@ -91,7 +91,7 @@ export class MarkdownTreeProcessor {
for (const file of children) {
const part = file['realFileName'];
if (callBack(file)) {
return [ file, curPath ? curPath + '/' + part : part ];
return [file, curPath ? curPath + '/' + part : part];
}
}

Expand Down Expand Up @@ -142,6 +142,6 @@ export class MarkdownTreeProcessor {
return null;
}

return this.driveTree[0]['wikigdrive'];
return this.driveTree[0]['wikigdrive'] || null;
}
}

0 comments on commit 74f4d1b

Please sign in to comment.