-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(axis): fix error when showing tick only
Do not call .getBBox() for empty node Fix #3881
- Loading branch information
Showing
3 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,9 @@ export default class AxisRendererHelper { | |
w: 5.5, | ||
h: 11.5 | ||
}; | ||
const text = node?.select("text"); | ||
|
||
!node.empty() && node.select("text") | ||
!text.empty() && text | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
netil
Author
Member
|
||
.text("0") | ||
.call(el => { | ||
try { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@netil isn't there a possibility for a NPE here?
node
is nullable on the line above sotext
could also benull
/undefined
here?