From 8022c7a59a35034a3f6b31310360e195fd9d4103 Mon Sep 17 00:00:00 2001 From: ktsn Date: Tue, 16 Oct 2018 02:35:34 +0800 Subject: [PATCH] fix: fix checking Reflect existance --- src/component.ts | 2 +- src/reflect.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/component.ts b/src/component.ts index c4efc20..147ad6f 100644 --- a/src/component.ts +++ b/src/component.ts @@ -82,7 +82,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 8acc2d3..9e5bfce 100644 --- a/src/reflect.ts +++ b/src/reflect.ts @@ -1,9 +1,7 @@ import Vue, { VueConstructor } from 'vue' import { VueClass } from './declarations' -export function reflectionIsSupported () { - return (Reflect && Reflect.defineMetadata) !== undefined -} +export const reflectionIsSupported = typeof Reflect !== undefined && Reflect.defineMetadata export function copyReflectionMetadata ( to: VueConstructor, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy