Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Oct 23, 2023
1 parent ed5734c commit 1ec329b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ const cacheValueInSettings = <T extends SettingValue>(
);
};

const releaseEndpoint =
process.env.OVERWRITE_INTERNAL_RELEASE_URL && process.env.OVERWRITE_INTERNAL_RELEASE_URL.trim().length > 0
? process.env.OVERWRITE_INTERNAL_RELEASE_URL
: 'https://releases.rocket.chat/v2/server/supportedVersions';
const releaseEndpoint = process.env.OVERWRITE_INTERNAL_RELEASE_URL?.trim()
? process.env.OVERWRITE_INTERNAL_RELEASE_URL.trim()
: 'https://releases.rocket.chat/v2/server/supportedVersions';

const getSupportedVersionsFromCloud = async () => {
if (process.env.CLOUD_SUPPORTED_VERSIONS_TOKEN) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ export const buildVersionUpdateMessage = async (
) => {
const lastCheckedVersion = settings.get<string>('Update_LatestAvailableVersion');

if (!lastCheckedVersion) {
return;
}

for await (const version of versions) {
if (!lastCheckedVersion) {
break;
}
if (semver.lte(version.version, lastCheckedVersion)) {
continue;
}
Expand Down

0 comments on commit 1ec329b

Please sign in to comment.