introduce undefined target platform
This commit is contained in:
parent
fbb1d8de11
commit
f124333cc2
|
@ -313,7 +313,7 @@ function getIsPreview(flags: string): boolean {
|
|||
}
|
||||
|
||||
function getTargetPlatform(version: IRawGalleryExtensionVersion): TargetPlatform {
|
||||
return version.targetPlatform ? toTargetPlatform(version.targetPlatform) : TargetPlatform.UNIVERSAL;
|
||||
return version.targetPlatform ? toTargetPlatform(version.targetPlatform) : TargetPlatform.UNDEFINED;
|
||||
}
|
||||
|
||||
function getAllTargetPlatforms(rawGalleryExtension: IRawGalleryExtension): TargetPlatform[] {
|
||||
|
@ -350,6 +350,11 @@ function isTargetPlatformCompatible(extensionTargetPlatform: TargetPlatform, all
|
|||
return false;
|
||||
}
|
||||
|
||||
// Compatible when extension target platform is not defined
|
||||
if (extensionTargetPlatform === TargetPlatform.UNDEFINED) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Compatible when extension target platform is universal
|
||||
if (extensionTargetPlatform === TargetPlatform.UNIVERSAL) {
|
||||
return true;
|
||||
|
|
|
@ -34,6 +34,7 @@ export const enum TargetPlatform {
|
|||
|
||||
UNIVERSAL = 'universal',
|
||||
UNKNOWN = 'unknown',
|
||||
UNDEFINED = 'undefined',
|
||||
}
|
||||
|
||||
export function toTargetPlatform(targetPlatform: string): TargetPlatform {
|
||||
|
|
Loading…
Reference in a new issue