chore(ngdoc): fix version number parsing for doc version switcher

This commit is contained in:
Igor Minar 2013-09-04 22:56:11 +02:00
parent c0ad2efb24
commit 80ea36256f

View file

@ -109,7 +109,7 @@ exports.ngVersions = function() {
//NON_RC_RELEASE_NUMBER is used to signal the non-RC version for the release and
//it will always appear at the top of the list since the number is so high!
versionMap[baseVersion].push(
version == baseVersion ? NON_RC_RELEASE_NUMBER : parseInt(version.match(/rc(\d+)/)[1]));
version == baseVersion ? NON_RC_RELEASE_NUMBER : parseInt(version.match(/rc\.?(\d+)/)[1]));
};
//flatten the map so that the RC versions occur in a natural sorted order