Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonLaster committed Jun 7, 2017
1 parent da83f45 commit 843108b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 8 additions & 4 deletions src/components/Editor/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ function getHiddenTabs(sourceTabs: SourcesList, sourceTabEls) {
return Math.min(...topOffsets);
}

const tabTopOffset = getTopOffset();
return sourceTabs.filter((tab, index) => {
function hasTopOffset(el) {
// adding 10px helps account for cases where the tab might be offset by
// styling such as selected tabs which don't have a border.
const el = sourceTabEls[index];
return el && el.getBoundingClientRect().top > tabTopOffset + 10;
const tabTopOffset = getTopOffset();
return el.getBoundingClientRect().top > tabTopOffset + 10;
}

return sourceTabs.filter((tab, index) => {
const element = sourceTabEls[index];
return element && hasTopOffset(element);
});
}

Expand Down
4 changes: 0 additions & 4 deletions src/components/SecondaryPanes/Expressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ class Expressions extends PureComponent {

let { value, path } = getValue(expression);

if (!value) {
debugger;
}

if (value.class == "Error") {
value = { unavailable: true };
}
Expand Down

0 comments on commit 843108b

Please sign in to comment.