Skip to content

Commit 749f5b8

Browse files
committed
Merge branch 'main' into next
2 parents d6f5489 + 82aa0e5 commit 749f5b8

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

Diff for: .github/workflows/build.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Build
2-
on: [push]
2+
on:
3+
push:
4+
paths-ignore:
5+
- 'docs/**'
6+
- 'README.md'
7+
38
jobs:
49
build:
510
runs-on: ubuntu-latest

Diff for: .github/workflows/gh-pages.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- 'docs/**'
8+
69
jobs:
710
build:
811
runs-on: ubuntu-latest

Diff for: __tests__/shim.test.ts

+11
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,17 @@ describe('SHIM: VueTypes', () => {
639639
})
640640
expect((VueTypes as any).customTypeChild.type).toBe(null)
641641
})
642+
643+
it('should be able to be get multiple times (eg:to avoid redefined property)', () => {
644+
VueTypes.extend({
645+
name: 'booleanCustom',
646+
getter: true,
647+
type: Boolean,
648+
default: undefined,
649+
})
650+
expect((VueTypes as any).booleanCustom.type).toBe(Boolean)
651+
expect((VueTypes as any).booleanCustom.type).toBe(Boolean)
652+
})
642653
})
643654
})
644655

Diff for: src/shim.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function createValidator(
9898
const prop = getter ? 'get' : 'value'
9999
const descr = {
100100
[prop]: () =>
101-
type(name, props, validable).def(
101+
type(name, Object.assign({}, props), validable).def(
102102
getter ? root.defaults[name] : undefined,
103103
),
104104
}

0 commit comments

Comments
 (0)