ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Cannot read property 'map' of undefined #101

Closed ryanluker closed 6 years ago

ryanluker commented 6 years ago

Bug:

If you do not have a coverage file you can get this error as the pickFile does not account for length 0 in its logic.

Info:

 public async pickFile(filePaths: string[], placeHolder: string): Promise<string | undefined> {
        let pickedFile: string;
        if (filePaths.length === 1) {
            pickedFile = filePaths[0];
        } else {
            const fileQuickPicks = filePaths.map((filePath) => {
                return {
                    description: filePath,
                    label: basename(filePath),
                };
            });