Skip to content

Commit

Permalink
Bail out from calculating dimenions for detached nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Mar 25, 2018
1 parent 260d44e commit d14339b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/calculateNodeHeight.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ function calculateNodeStyling(node, uid, useCache = false) {

const boxSizing = sizingStyle['box-sizing'];

// probably node is detached from DOM, can't read computed dimensions
if (boxSizing === '') {
return null;
}

// IE (Edge has already correct behaviour) returns content width as computed width
// so we need to add manually padding and border widths
if (isIE && boxSizing === 'border-box') {
Expand Down

0 comments on commit d14339b

Please sign in to comment.