Skip to content

Commit 1ddb47c

Browse files
committed
production build
1 parent 77582bd commit 1ddb47c

File tree

6 files changed

+831
-6
lines changed

6 files changed

+831
-6
lines changed

dist/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var VueTypes = {
9292
if (getter) {
9393
descriptor = {
9494
get: function get() {
95-
return (0, _utils.toType)(name, type, validate);
95+
return (0, _utils.toType)(name, Object.assign({}, type), validate);
9696
},
9797
enumerable: true,
9898
configurable: false
@@ -101,15 +101,17 @@ var VueTypes = {
101101
var validator = type.validator;
102102
descriptor = {
103103
value: function value() {
104+
var ret = (0, _utils.toType)(name, Object.assign({}, type), validate);
105+
104106
if (validator) {
105107
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
106108
args[_key] = arguments[_key];
107109
}
108110

109-
type.validator = validator.bind.apply(validator, [this].concat(args));
111+
ret.validator = validator.bind.apply(validator, [ret].concat(args));
110112
}
111113

112-
return (0, _utils.toType)(name, type, validate);
114+
return ret;
113115
},
114116
writable: false,
115117
enumerable: true,

es/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ var VueTypes = {
8282
if (getter) {
8383
descriptor = {
8484
get: function get() {
85-
return toType(name, type, validate);
85+
return toType(name, Object.assign({}, type), validate);
8686
},
8787
enumerable: true,
8888
configurable: false
@@ -91,15 +91,17 @@ var VueTypes = {
9191
var validator = type.validator;
9292
descriptor = {
9393
value: function value() {
94+
var ret = toType(name, Object.assign({}, type), validate);
95+
9496
if (validator) {
9597
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9698
args[_key] = arguments[_key];
9799
}
98100

99-
type.validator = validator.bind.apply(validator, [this].concat(args));
101+
ret.validator = validator.bind.apply(validator, [ret].concat(args));
100102
}
101103

102-
return toType(name, type, validate);
104+
return ret;
103105
},
104106
writable: false,
105107
enumerable: true,

0 commit comments

Comments
 (0)