Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6.1: fix error cannot read property 'replace' of undefined. #164

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to the "vscode-spring-initializr" extension will be documented in this file.

## 0.6.1
- Fix Error: Cannot read property 'split' of undefined. [#162](https://github.com/microsoft/vscode-spring-initializr/issues/162#issuecomment-726832226)

## 0.6.0
- Allow commands to start initializr wizard with default selections.
- Add a new setting `spring.initializr.defaultOpenProjectMethod` for default project opening method.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-spring-initializr",
"displayName": "Spring Initializr Java Support",
"description": "A lightweight extension based on Spring Initializr to generate quick start Spring Boot Java projects.",
"version": "0.6.0",
"version": "0.6.1",
"icon": "resources/logo.png",
"publisher": "vscjava",
"aiKey": "05fb8871-fbf0-488f-8453-a74cf0ca9b93",
Expand Down
9 changes: 6 additions & 3 deletions src/Utils/VersionHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ export function compareVersions(a: string, b: string): number {
return result;
}
}
const aqual: string = parseQualifier(versionA[3]);
const bqual: string = parseQualifier(versionB[3]);
// version[3] can be undefined
const aqualRaw: string = versionA[3] || "RELEASE";
const bqualRaw: string = versionB[3] || "RELEASE";
const aqual: string = parseQualifier(aqualRaw);
const bqual: string = parseQualifier(bqualRaw);
result = qualifiers.indexOf(aqual) - qualifiers.indexOf(bqual);
if (result !== 0) {
return result;
}
return versionA[3].localeCompare(versionB[3]);
return aqualRaw.localeCompare(bqualRaw);
}

function parseQualifier(version: string): string {
Expand Down