mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 22:51:14 +00:00
fix(op_crates): Don't use Deno.inspect
in op crates (#9332)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
This commit is contained in:
parent
47b3e4bada
commit
900953a65a
10 changed files with 48 additions and 63 deletions
|
@ -873,7 +873,11 @@
|
|||
nonUniqueCustomInspect in value &&
|
||||
typeof value[nonUniqueCustomInspect] === "function"
|
||||
) {
|
||||
return String(value[nonUniqueCustomInspect]());
|
||||
// TODO(nayeemrmn): `inspect` is passed as an argument because custom
|
||||
// inspect implementations in `op_crates` need it, but may not have access
|
||||
// to the `Deno` namespace in web workers. Remove when the `Deno`
|
||||
// namespace is always enabled.
|
||||
return String(value[nonUniqueCustomInspect](inspect));
|
||||
}
|
||||
if (value instanceof Error) {
|
||||
return String(value.stack);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue