Skip to content

Commit

Permalink
handle views without clientSize
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancahill committed Nov 5, 2018
1 parent 6c0f27a commit d3c3e2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/splitjs/src/split.js
Expand Up @@ -348,11 +348,14 @@ const Split = (idsOption, options = {}) => {

function innerSize(element) {
// Return nothing if getComputedStyle is not supported (< IE9)
// Or if parent element has no layout yet
if (!getComputedStyle) return null

const computedStyle = getComputedStyle(element)
let size = element[clientSize]

if (size === 0) return null

if (direction === HORIZONTAL) {
size -=
parseFloat(computedStyle.paddingLeft) +
Expand Down

0 comments on commit d3c3e2e

Please sign in to comment.