Skip to content

Commit

Permalink
Fix tree version
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Oct 19, 2023
1 parent 10d003d commit a00fd7e
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 a00fd7e

Please sign in to comment.