Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…gator into fix/#326-handle-empty-tactic-names
  • Loading branch information
iguannalin committed Apr 26, 2022
2 parents 981dbd1 + 22e96c3 commit cdda2f5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
The creation of the tag can be disabled with the --no-git-tag-version if desired.
-->

# v4.6.1 - 26 April 2022

## Fixes

- Fixed a versioning error that occurred when loading a local layer with a previous version of ATT&CK.

# v4.6.0 - 25 April 2022

Adds support for ATT&CK v11.
Expand Down
4 changes: 2 additions & 2 deletions nav-app/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 nav-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/mitre-attack/attack-navigator.git"
},
"version": "4.6.0",
"version": "4.6.1",
"license": "Apache-2.0",
"scripts": {
"ng": "ng",
Expand Down
8 changes: 5 additions & 3 deletions nav-app/src/app/data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class DataService {
"mitre-mobile": "mobile-attack"
}
public domains: Domain[] = [];
public versions: any[] = [];
public versions: Version[] = [];

public subtechniquesEnabled: boolean = true;

Expand Down Expand Up @@ -206,7 +206,7 @@ export class DataService {
*/
setUpURLs(versions: []){
versions.forEach( (version: any) => {
let v: Version = new Version(version["name"], version["version"]);
let v: Version = new Version(version["name"], version["version"].match(/[0-9]+/g)[0]);
this.versions.push(v);
version["domains"].forEach( (domain: any) => {
let identifier = domain["identifier"];
Expand Down Expand Up @@ -330,7 +330,9 @@ export class DataService {
* Is the given version supported?
*/
isSupported(version: string) {
return version.match(/[0-9]+/g)[0] < this.versions[this.versions.length - 1].number.match(/[0-9]+/g)[0] ? false : true;
let supported = this.versions.map(v => v.number);
let match = version.match(/[0-9]+/g)[0];
return supported.includes(match);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion nav-app/src/app/tabs/tabs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ export class TabsComponent implements AfterContentInit, AfterViewInit {
}
})
.catch( (err) => {
console.error(err.message);
console.error(err);
alert("ERROR parsing file, check the javascript console for more information.");
resolve(null);
});
Expand Down

0 comments on commit cdda2f5

Please sign in to comment.