Skip to content

Commit 533ce16

Browse files
fix: adds check for Reflect. Reflect.getOwnMetadataKeys
1 parent 7ecde38 commit 533ce16

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/reflect.ts

+5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ export function copyReflectionMetadata (
1818
})
1919
}
2020

21+
const reflectionMetadataKeysIsSupported = reflectionIsSupported && Reflect.getOwnMetadataKeys
22+
2123
function forwardMetadata (to: object, from: object, propertyKey?: string): void {
24+
if (!reflectionMetadataKeysIsSupported) {
25+
return
26+
}
2227
const metaKeys = propertyKey
2328
? Reflect.getOwnMetadataKeys(from, propertyKey)
2429
: Reflect.getOwnMetadataKeys(from)

0 commit comments

Comments
 (0)