Skip to content

Commit

Permalink
fix(hiccup-svg): check values passed to numericAttribs are actually n…
Browse files Browse the repository at this point in the history
…umeric
  • Loading branch information
dmnsgn committed Sep 7, 2021
1 parent ea41cc3 commit dbd51c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hiccup-svg/src/format.ts
Expand Up @@ -26,7 +26,7 @@ export const fpoints = (pts: Vec2Like[], sep = " ") =>
export const numericAttribs = (attribs: any, ...ids: string[]) => {
let v: any;
for (let id of ids) {
(v = attribs[id]) != null && (attribs[id] = ff(v));
typeof (v = attribs[id]) === "number" && (attribs[id] = ff(v));
}
return attribs;
};
Expand Down

0 comments on commit dbd51c3

Please sign in to comment.