Skip to content

Commit

Permalink
refactor(geom): update withAttribs(), make new attribs optional
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed May 3, 2024
1 parent 5d5951c commit 688e1bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/geom/src/with-attribs.ts
Expand Up @@ -12,6 +12,6 @@ import type { Attribs, IShape } from "@thi.ng/geom-api";
*/
export const withAttribs = <T extends IShape>(
shape: T,
attribs: Attribs,
attribs: Attribs = {},
replace = true
) => <T>shape.withAttribs(replace ? attribs : { ...shape.attribs, ...attribs });

0 comments on commit 688e1bf

Please sign in to comment.