2
0
mirror of https://github.com/frappe/books.git synced 2024-09-18 18:49:01 +00:00

Fixed an accidental divide by 0 edge case

This commit is contained in:
Isaac GC 2024-01-24 16:34:07 -08:00 committed by Isaac-GC
parent 7e1de76763
commit 808116d5dd
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ export default {
this.padding +
this.left +
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
(this.count - 1)
(this.count - 1 || 1) // The "or" one (1) prevents accidentally dividing by 0
);
},
z() {

View File

@ -193,7 +193,7 @@ export default {
this.padding +
this.left +
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
(this.count - 1)
(this.count - 1 || 1) // The "or" one (1) prevents accidentally dividing by 0
);
},
ys() {