mirror of
https://github.com/frappe/books.git
synced 2024-12-22 10:58:59 +00:00
Fixed an accidental divide by 0 edge case
This commit is contained in:
parent
7e1de76763
commit
808116d5dd
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user