Skip to content

Commit 8eb3393

Browse files
committed
refactor: format
1 parent 10ff11a commit 8eb3393

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Diff for: src/component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export function componentFactory (
3939
if (descriptor.value !== void 0) {
4040

4141
// methods
42-
if(typeof descriptor.value === 'function') {
43-
(options.methods || (options.methods = {}))[key] = descriptor.value
42+
if (typeof descriptor.value === 'function') {
43+
(options.methods || (options.methods = {}))[key] = descriptor.value
4444
} else {
4545
// typescript decorated data
4646
(options.mixins || (options.mixins = [])).push({

Diff for: test/test-babel.js

-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ describe('vue-class-component with Babel', () => {
2929
})
3030

3131
it('should collect decorated class properties', () => {
32-
3332
const valueDecorator = (value) => () => {
3433
return {
3534
enumerable: true,
@@ -48,13 +47,11 @@ describe('vue-class-component with Babel', () => {
4847

4948
@Component
5049
class MyComp extends Vue {
51-
5250
@valueDecorator('field1')
5351
field1
5452

5553
@getterDecorator('field2')
5654
field2
57-
5855
}
5956

6057
const c = new MyComp()

Diff for: test/test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ describe('vue-class-component', () => {
6161
})
6262

6363
it('data: should collect from decorated class properties', () => {
64-
6564
const valueDecorator = (value: any) => (_: any, __: any): any => {
6665
return {
6766
enumerable: true,
@@ -76,7 +75,7 @@ describe('vue-class-component', () => {
7675
return value;
7776
}
7877
}
79-
}
78+
}
8079

8180
@Component
8281
class MyComp extends Vue {

0 commit comments

Comments
 (0)