Skip to content

Commit e55b3da

Browse files
committed
js style fixes
1 parent c583dc5 commit e55b3da

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

blocks/card/card.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ window.addEventListener('load', () => {
2121
CM.flushRectCaches();
2222
//C.flushRectCaches();
2323
}
24-
24+
2525
let lastEvent = null;
26+
/**
27+
* @param {event} event - optional event that could be passed to
28+
* change the event the doEvent functions run on
29+
* @returns {void}
30+
*/
2631
function doEvent(event = lastEvent) {
2732
CP.doEvent(event);
2833
CM.doEvent(event);
@@ -38,10 +43,9 @@ window.addEventListener('load', () => {
3843
/**
3944
* @todo this creates a dependency to the projects block by using
4045
* their classes, resolve somehow?
41-
*/
42-
document.querySelector('.projects__inner').addEventListener('scroll', (e) => {
43-
doEvent();
44-
});
46+
*/
47+
document.querySelector('.projects__inner')
48+
.addEventListener('scroll', () => doEvent());
4549

4650
window.addEventListener('pushstate', onMove);
4751
window.addEventListener('popstate', onMove);

0 commit comments

Comments
 (0)