We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ecde38 commit 3bde069Copy full SHA for 3bde069
src/reflect.ts
@@ -1,7 +1,10 @@
1
import Vue, { VueConstructor } from 'vue'
2
import { VueClass } from './declarations'
3
4
-export const reflectionIsSupported = typeof Reflect !== 'undefined' && Reflect.defineMetadata
+// The rational behind the verbose Reflect-feature check below is the fact that there are polyfills
5
+// which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.
6
+// Without this check consumers will encounter hard to track down runtime errors.
7
+export const reflectionIsSupported = typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys
8
9
export function copyReflectionMetadata (
10
to: VueConstructor,
0 commit comments