Skip to content

Commit 3371256

Browse files
authored
use duck test for marks (#967)
1 parent ecfaba4 commit 3371256

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export function marks(...marks) {
307307
}
308308

309309
function markify(mark) {
310-
return mark instanceof Mark ? mark : new Render(mark);
310+
return typeof mark?.render === "function" ? mark : new Render(mark);
311311
}
312312

313313
class Render extends Mark {

0 commit comments

Comments
 (0)