Skip to content

Commit 6259c5a

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 468738f + d09cf1f commit 6259c5a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src-runtime/inspectType.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,17 @@ function inspectType(value, expect, loc, name, critical = true) {
111111
if (!isClonable(value)) {
112112
value = valueToString;
113113
}
114-
crossContextPostMessage({type: 'rti', action: 'addError', destination: 'ui', value, expect, loc, name, valueToString, strings, extras, key});
114+
for (const extra of extras) {
115+
if (!isClonable(extra)) {
116+
extra.value = extra.value?.toString();
117+
}
118+
}
119+
const msg = {type: 'rti', action: 'addError', destination: 'ui', value, expect, loc, name, valueToString, strings, extras, key};
120+
try {
121+
crossContextPostMessage(msg);
122+
} catch (e) {
123+
console.error(e, msg);
124+
}
115125
}
116126
return ret;
117127
}

0 commit comments

Comments
 (0)