Skip to content
Snippets Groups Projects
Commit 95e3e26f authored by Alex Rickabaugh's avatar Alex Rickabaugh
Browse files

Revert "refactor(core): optimize calls to `split` and `slice` while computing...

Revert "refactor(core): optimize calls to `split` and `slice` while computing version parts (#41208)"

This reverts commit 744bd2b6.

This commit seems to cause issues in Safari.
parent f66c9ae7
Branches
Tags
No related merge requests found
......@@ -23,10 +23,10 @@ export class Version {
public readonly patch: string;
constructor(public full: string) {
const [major, minor, ...rest] = full.split('.');
this.major = major;
this.minor = minor;
this.patch = rest.join('.');
const splits = full.split('.');
this.major = splits[0];
this.minor = splits[1];
this.patch = splits.slice(2).join('.');
}
}
......
......@@ -236,10 +236,10 @@ export class Version {
public readonly patch: string;
constructor(public full: string) {
const [major, minor, ...rest] = full.split('.');
this.major = major;
this.minor = minor;
this.patch = rest.join('.');
const splits = full.split('.');
this.major = splits[0];
this.minor = splits[1];
this.patch = splits.slice(2).join('.');
}
}
......
......@@ -17,10 +17,9 @@ export class Version {
public readonly patch: string;
constructor(public full: string) {
const [major, minor, ...rest] = full.split('.');
this.major = major;
this.minor = minor;
this.patch = rest.join('.');
this.major = full.split('.')[0];
this.minor = full.split('.')[1];
this.patch = full.split('.').slice(2).join('.');
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment