There was an error while loading. Please reload this page.
0
1 parent 67c265a commit 713690cCopy full SHA for 713690c
2 files changed
.changeset/pretty-humans-add.md
@@ -0,0 +1,5 @@
1
+---
2
+"@react-pdf/pdfkit": patch
3
4
+
5
+fix: support values of `0` in stroke-dasharray
packages/pdfkit/src/mixins/vector.js
@@ -67,12 +67,12 @@ export default {
67
length = [length, options.space || length];
68
}
69
70
- const valid = length.every((x) => Number.isFinite(x) && x > 0);
+ const valid = length.every((x) => Number.isFinite(x) && x >= 0);
71
if (!valid) {
72
throw new Error(
73
`dash(${JSON.stringify(originalLength)}, ${JSON.stringify(
74
options
75
- )}) invalid, lengths must be numeric and greater than zero`
+ )}) invalid, lengths must be numeric and greater than or equal to zero`
76
);
77
78
0 commit comments