🔐 Fix release path to verify from >= 0

This commit is contained in:
C-3PO 2018-07-04 15:48:34 +02:00
parent 7ce5a177ec
commit e03f28f654
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -3,6 +3,10 @@ import verifyProductName from '../ssn/verify/verifyProductName';
/** For the given release in the given product, returns from which releases we can patch to this release. */
function getFroms({ product, to: releaseTo}: {product: Product, to: number}) {
if (releaseTo < 0) {
return [];
}
//The launcher (patcher, patcher2014, patcher2017) is always installing from -1, never from a previous version
if (product.startsWith('patcher')) {
return [-1];