Skip to content

Commit 4b6c978

Browse files
committed
fix(core): optional param
1 parent 2144577 commit 4b6c978

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/pfe-core/controllers/scroll-spy-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class ScrollSpyController implements ReactiveController {
163163
const [entry] = [...this.#intersectionEntries].sort((a, b) => {
164164
return b.boundingClientRect.y - a.boundingClientRect.y;
165165
});
166-
link = this.#targetLinkMap.get(entry.target);
166+
link = this.#targetLinkMap.get(entry?.target);
167167
}
168168
if (link) {
169169
this.#setActive(link);

0 commit comments

Comments
 (0)