Skip to content

Build your personal knowledge base with Trilium Notes

handle views without clientSize

Nathan Cahilldcd51d64fb2f
diff --git a/packages/splitjs/src/split.js b/packages/splitjs/src/split.js
index 25088a0e0f..057776d5e6 100644
--- a/packages/splitjs/src/split.js
+++ b/packages/splitjs/src/split.js
@@ -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) +