Skip to content

Commit e80a44b

Browse files
authored
fix: fix checking Reflect existance (#284)
1 parent dfd45be commit e80a44b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function componentFactory (
8282

8383
forwardStaticMembers(Extended, Component, Super)
8484

85-
if (reflectionIsSupported()) {
85+
if (reflectionIsSupported) {
8686
copyReflectionMetadata(Extended, Component)
8787
}
8888

src/reflect.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import Vue, { VueConstructor } from 'vue'
22
import { VueClass } from './declarations'
33

4-
export function reflectionIsSupported () {
5-
return (Reflect && Reflect.defineMetadata) !== undefined
6-
}
4+
export const reflectionIsSupported = typeof Reflect !== undefined && Reflect.defineMetadata
75

86
export function copyReflectionMetadata (
97
to: VueConstructor,

0 commit comments

Comments
 (0)
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