Skip to content

Commit 68c3c2d

Browse files
committed
Refactor height fallback
1 parent 418a319 commit 68c3c2d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/components/scroll-container.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ export default class ScrollContainerComponent extends Component {
3131
if (index === -1) {
3232
return htmlSafe('display: none;');
3333
} else {
34+
const height = itemHeight ?? 0;
35+
3436
return htmlSafe(`
3537
position: absolute;
3638
width: 100%;
37-
height: ${itemHeight || 0}px;
39+
height: ${height}px;
3840
margin: 0px;
3941
padding: 0px;
40-
top: ${index * itemHeight || 0}px;
4142
left: 0px;
43+
top: ${index * height}px;
4244
z-index: -9999;
4345
pointer-events: none;
4446
`);

0 commit comments

Comments
 (0)