Skip to content

In the Reflect.ts file, IsObject(target) and IsUndefined(propertyKey) are executed twice #171

@ywp123123

Description

@ywp123123

In the Reflect.ts file, IsObject(target) and IsUndefined(propertyKey) are executed twice. Was this an accidental modification during the reflect-metadata upgrade?

  function deleteMetadata(metadataKey: any, target: any, propertyKey?: string | symbol): boolean {
            if (!IsObject(target)) throw new TypeError();
            if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
            if (!IsObject(target)) throw new TypeError();
            if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
            const provider = GetMetadataProvider(target, propertyKey, /*Create*/ false);
            if (IsUndefined(provider)) return false;
            return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions