Skip to content

Commit bd696be

Browse files
committed
Handle case when both label and hash are missing
1 parent bc04919 commit bd696be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/script/utils/acquisition.ts

+3
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ function getUpdatePackage(packageHistory: Package[], request: UpdateCheckRequest
5959
// Note that older client plugin versions do not send the release label. If the
6060
// label is supplied, we use label comparison, since developers can release the
6161
// same update twice. Otherwise, we fall back to hash comparison.
62+
// If request is missing both label and hash we take the latest package
63+
// as we cannot determine which one the client is running
6264
foundRequestPackageInHistory =
6365
foundRequestPackageInHistory ||
66+
(!request.label && !request.packageHash) ||
6467
(request.label && packageEntry.label === request.label) ||
6568
(!request.label && packageEntry.packageHash === request.packageHash);
6669
if (packageEntry.isDisabled || (ignoreRolloutPackages && isUnfinishedRollout(packageEntry.rollout))) {

0 commit comments

Comments
 (0)