Skip to content

Commit

Permalink
fix: fix checking Reflect existance (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn committed Oct 15, 2018
1 parent dfd45be commit e80a44b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/component.ts
Expand Up @@ -82,7 +82,7 @@ export function componentFactory (

forwardStaticMembers(Extended, Component, Super)

if (reflectionIsSupported()) {
if (reflectionIsSupported) {
copyReflectionMetadata(Extended, Component)
}

Expand Down
4 changes: 1 addition & 3 deletions 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,
Expand Down

0 comments on commit e80a44b

Please sign in to comment.