diff --git a/src/component.ts b/src/component.ts index 6524e7c..54a8192 100644 --- a/src/component.ts +++ b/src/component.ts @@ -83,7 +83,7 @@ export function componentFactory ( forwardStaticMembers(Extended, Component, Super) - if (reflectionIsSupported) { + if (reflectionIsSupported()) { copyReflectionMetadata(Extended, Component) } diff --git a/src/reflect.ts b/src/reflect.ts index 09f40e6..ab65dff 100644 --- a/src/reflect.ts +++ b/src/reflect.ts @@ -4,7 +4,9 @@ import { VueClass } from './declarations' // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills // which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys. // Without this check consumers will encounter hard to track down runtime errors. -export const reflectionIsSupported = typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys +export function reflectionIsSupported () { + return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys +} export function copyReflectionMetadata ( to: VueConstructor,