diff --git a/public/client.js b/public/client.js index a27b5b039..5297bdc69 100644 --- a/public/client.js +++ b/public/client.js @@ -96,7 +96,9 @@ export function define(cell) { } : (v) => { reset?.(); - inspector().fulfilled(v); + const custom = v?.[Symbol.for("observablehq.display")]; + if (custom != null && typeof custom !== "function") throw new Error(`Unsupported custom inspector ${custom}`); + inspector().fulfilled(custom ? custom(v) : v); return v; }; const v = main.variable(