mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +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.padding +
|
||||||
this.left +
|
this.left +
|
||||||
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
|
(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() {
|
z() {
|
||||||
|
@ -193,7 +193,7 @@ export default {
|
|||||||
this.padding +
|
this.padding +
|
||||||
this.left +
|
this.left +
|
||||||
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
|
(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() {
|
ys() {
|
||||||
|
Loading…
Reference in New Issue
Block a user