Skip to content

Commit

Permalink
fix: youtube-music parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Oct 1, 2022
1 parent 3dfefb1 commit fec05e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wsEvents/getAppVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const APKMIRROR_UPLOAD_BASE = 'https://www.apkmirror.com/uploads/?appcategory=';
const sanitizeVersion = (ver) => {
return ver
.replace(/\.0(\d)/gi, '.$1') // because apparently x.0y.z (ex. 5.09.51) isn't a valid version
.replace(/^(\d+)\.(\d+)$/gi, '$1.$2.0'); // nor are versions without a patch (ex. 2.3)
.replace(/^(\d+)\.(\d+)$/gi, '$1.$2.0') // nor are versions without a patch (ex. 2.3)
.replace('-CAR_RELEASE',''); // because CAR_RELEASE (ex. 5.26.20-CAR_RELEASE) isn't a valid version
};

/**
Expand Down

0 comments on commit fec05e2

Please sign in to comment.