From 688e1bf4aa62149dea56d6236b71d34dc3517f7f Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Fri, 3 May 2024 16:42:43 +0200 Subject: [PATCH] refactor(geom): update withAttribs(), make new attribs optional --- packages/geom/src/with-attribs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/geom/src/with-attribs.ts b/packages/geom/src/with-attribs.ts index c858f0557a..14b71e69af 100644 --- a/packages/geom/src/with-attribs.ts +++ b/packages/geom/src/with-attribs.ts @@ -12,6 +12,6 @@ import type { Attribs, IShape } from "@thi.ng/geom-api"; */ export const withAttribs = ( shape: T, - attribs: Attribs, + attribs: Attribs = {}, replace = true ) => shape.withAttribs(replace ? attribs : { ...shape.attribs, ...attribs });