Support esnext in storybook

This commit is contained in:
Fedor Indutny 2023-01-12 12:58:53 -08:00 committed by GitHub
parent 468ca256e6
commit 19279cfebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1088 additions and 434 deletions

View file

@ -1,7 +1,6 @@
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import is from '@sindresorhus/is';
import os from 'os';
import semver from 'semver';
@ -14,7 +13,7 @@ export const isWindows = (minVersion?: string): boolean => {
return false;
}
return is.undefined(minVersion) ? true : semver.gte(osRelease, minVersion);
return minVersion === undefined ? true : semver.gte(osRelease, minVersion);
};
// Windows 10 and above