Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
v8.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kaorun343 committed Apr 24, 2020
1 parent 0babfc3 commit f70446c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-property-decorator",
"version": "8.4.1",
"version": "8.4.2",
"description": "property decorators for Vue Component",
"main": "lib/vue-property-decorator.umd.js",
"module": "lib/vue-property-decorator.js",
Expand Down
10 changes: 5 additions & 5 deletions src/vue-property-decorator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** vue-property-decorator verson 8.4.1 MIT LICENSE copyright 2019 kaorun343 */
/** vue-property-decorator verson 8.4.2 MIT LICENSE copyright 2019 kaorun343 */
/// <reference types='reflect-metadata'/>
'use strict'
import Vue, { PropOptions, WatchOptions } from 'vue'
Expand Down Expand Up @@ -46,7 +46,7 @@ export function InjectReactive(options?: InjectOptions | InjectKey) {
const fromKey = !!options ? (options as any).from || options : key
const defaultVal = (!!options && (options as any).default) || undefined
if (!componentOptions.computed) componentOptions.computed = {}
componentOptions.computed![key] = function() {
componentOptions.computed![key] = function () {
const obj = (this as any)[reactiveInjectKey]
return obj ? obj[fromKey] : defaultVal
}
Expand All @@ -62,7 +62,7 @@ interface provideObj {
type provideFunc = ((this: any) => Object) & provideObj

function produceProvide(original: any) {
let provide: provideFunc = function(this: any) {
let provide: provideFunc = function (this: any) {
let rv = typeof original === 'function' ? original.call(this) : original
rv = Object.create(rv || null)
// set reactive services (propagates previous services if necessary)
Expand Down Expand Up @@ -261,7 +261,7 @@ const hyphenate = (str: string) => str.replace(hyphenateRE, '-$1').toLowerCase()
* @return MethodDecorator
*/
export function Emit(event?: string) {
return function(_target: Vue, propertyKey: string, descriptor: any) {
return function (_target: Vue, propertyKey: string, descriptor: any) {
const key = hyphenate(propertyKey)
const original = descriptor.value
descriptor.value = function emitter(...args: any[]) {
Expand Down Expand Up @@ -290,7 +290,7 @@ export function Emit(event?: string) {
const returnValue: any = original.apply(this, args)

if (isPromise(returnValue)) {
returnValue.then(returnValue => {
returnValue.then((returnValue) => {
emit(returnValue)
})
} else {
Expand Down

0 comments on commit f70446c

Please sign in to comment.