Commit 6a8c7fb
authored
Add defensive checks for cases where maxHeight is empty string (#482)
* Fix assertion error when maxHeight is empty string
When getComputedStyle().maxHeight returns an empty string (which can
happen during DOM transitions, animations, or certain CSS edge cases),
the existing check `maxHeightStyle !== 'none'` passes, but the
subsequent call to estimateElementHeight() fails its assertion because
empty string is falsy.
Add a truthiness check to prevent calling estimateElementHeight() with
an empty or falsy maxHeight value.
Fixes assertion: "You called estimateElementHeight without a fallbackHeight"
* fix: add defensive check for error: Uncaught Error: Assertion Failed: You called estimateElement height without a fallbackHeight
at assert$1 (assert.js:40:13)
at estimateElementHeight (estimate-element-height.js:3:3)
at StaticRadar._updateConstants (radar.js:340:36)
at StaticRadar.update (radar.js:222:10)
at radar.js:214:12
at Array.execJob (index.js:30:7)
at Scheduler.flush (index.js:92:11)
at index.js:78:12
at sentryWrapped (helpers.js:117:17)1 parent 1846c99 commit 6a8c7fb
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
| 413 | + | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
| |||
0 commit comments