Skip to content

Commit d0d4383

Browse files
committed
chore: format code
1 parent 84cb7f1 commit d0d4383

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/core/event/index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,16 @@ export function Events(Base) {
9999
if (headingsInView.size === 1) {
100100
activeHeading = headingsInView.values().next().value;
101101
} else if (headingsInView.size > 1) {
102-
activeHeading = Array.from(headingsInView).reduce((closest, current) => {
103-
return !closest || (closest.compareDocumentPosition(current) & Node.DOCUMENT_POSITION_FOLLOWING)
104-
? current
105-
: closest;
106-
}, null);
102+
activeHeading = Array.from(headingsInView).reduce(
103+
(closest, current) => {
104+
return !closest ||
105+
closest.compareDocumentPosition(current) &
106+
Node.DOCUMENT_POSITION_FOLLOWING
107+
? current
108+
: closest;
109+
},
110+
null,
111+
);
107112
}
108113

109114
if (activeHeading) {

0 commit comments

Comments
 (0)