Skip to content

Commit

Permalink
ResizeObserver: borderBoxSize is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Aug 5, 2020
1 parent 5dd2a0d commit 7a998ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/insipid_sphinx_theme/insipid/static/insipid-sidebar.js_t
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ $(document).ready(function () {
const resizeObserver = new ResizeObserver(entries => {
for (let entry of entries) {
let height;
if(entry.borderBoxSize) {
height = entry.borderBoxSize.blockSize;
if (entry.borderBoxSize && entry.borderBoxSize.length > 0) {
height = entry.borderBoxSize[0].blockSize;
} else {
height = entry.contentRect.height;
}
Expand All @@ -233,8 +233,8 @@ $(document).ready(function () {
const resizeObserver = new ResizeObserver(entries => {
for (let entry of entries) {
let height;
if(entry.borderBoxSize) {
height = entry.borderBoxSize.blockSize;
if (entry.borderBoxSize && entry.borderBoxSize.length > 0) {
height = entry.borderBoxSize[0].blockSize;
} else {
height = entry.contentRect.height;
}
Expand Down

0 comments on commit 7a998ba

Please sign in to comment.