@@ -102,8 +102,24 @@ exports[`CTag renders with close button properly 1`] = `
102
102
class = " chakra-icon css-1md6f3y"
103
103
emit = " (event, ...args) => instance.emit(event, ...args)"
104
104
expose = " exposed => {
105
- if (instance.exposed) {
106
- warn(\`expose() should be called only once per setup().\`);
105
+ {
106
+ if (instance.exposed) {
107
+ warn(\`expose() should be called only once per setup().\`);
108
+ }
109
+ if (exposed != null) {
110
+ let exposedType = typeof exposed;
111
+ if (exposedType === 'object') {
112
+ if (shared.isArray(exposed)) {
113
+ exposedType = 'array';
114
+ }
115
+ else if (reactivity.isRef(exposed)) {
116
+ exposedType = 'ref';
117
+ }
118
+ }
119
+ if (exposedType !== 'object') {
120
+ warn(\`expose() should be passed a plain object, received \${exposedType}.\`);
121
+ }
122
+ }
107
123
}
108
124
instance.exposed = exposed || {};
109
125
}"
@@ -143,8 +159,24 @@ exports[`CTag renders with disabled button properly 1`] = `
143
159
class = " chakra-icon css-1md6f3y"
144
160
emit = " (event, ...args) => instance.emit(event, ...args)"
145
161
expose = " exposed => {
146
- if (instance.exposed) {
147
- warn(\`expose() should be called only once per setup().\`);
162
+ {
163
+ if (instance.exposed) {
164
+ warn(\`expose() should be called only once per setup().\`);
165
+ }
166
+ if (exposed != null) {
167
+ let exposedType = typeof exposed;
168
+ if (exposedType === 'object') {
169
+ if (shared.isArray(exposed)) {
170
+ exposedType = 'array';
171
+ }
172
+ else if (reactivity.isRef(exposed)) {
173
+ exposedType = 'ref';
174
+ }
175
+ }
176
+ if (exposedType !== 'object') {
177
+ warn(\`expose() should be passed a plain object, received \${exposedType}.\`);
178
+ }
179
+ }
148
180
}
149
181
instance.exposed = exposed || {};
150
182
}"
@@ -223,8 +255,24 @@ exports[`CTag renders with left icon and close button 1`] = `
223
255
class = " chakra-icon css-1md6f3y"
224
256
emit = " (event, ...args) => instance.emit(event, ...args)"
225
257
expose = " exposed => {
226
- if (instance.exposed) {
227
- warn(\`expose() should be called only once per setup().\`);
258
+ {
259
+ if (instance.exposed) {
260
+ warn(\`expose() should be called only once per setup().\`);
261
+ }
262
+ if (exposed != null) {
263
+ let exposedType = typeof exposed;
264
+ if (exposedType === 'object') {
265
+ if (shared.isArray(exposed)) {
266
+ exposedType = 'array';
267
+ }
268
+ else if (reactivity.isRef(exposed)) {
269
+ exposedType = 'ref';
270
+ }
271
+ }
272
+ if (exposedType !== 'object') {
273
+ warn(\`expose() should be passed a plain object, received \${exposedType}.\`);
274
+ }
275
+ }
228
276
}
229
277
instance.exposed = exposed || {};
230
278
}"
0 commit comments