Skip to content

Commit

Permalink
Fix return type of queryFragmentElement
Browse files Browse the repository at this point in the history
  • Loading branch information
hirasso committed May 21, 2024
1 parent 5df098e commit 1c5101e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inc/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export function queryFragmentElement(
): FragmentElement | undefined {
for (const containerSelector of swup.options.containers) {
const container = document.querySelector(containerSelector);
if (container?.matches(fragmentSelector)) return container;
if (container?.matches(fragmentSelector)) return container as FragmentElement;

const fragment = container?.querySelector<FragmentElement>(fragmentSelector);
if (fragment) return fragment;
Expand Down

0 comments on commit 1c5101e

Please sign in to comment.