Skip to content

Commit

Permalink
Merge pull request #51 from NukeJS/patch-1
Browse files Browse the repository at this point in the history
Also check for persistTags string length
  • Loading branch information
daun authored Sep 9, 2024
2 parents c9cd91c + 6d2436e commit 4e6d77d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class SwupHeadPlugin extends Plugin {
if (typeof persistTags === 'function') {
return persistTags(el);
}
if (typeof persistTags === 'string') {
if (typeof persistTags === 'string' && persistTags.length > 0) {
return el.matches(persistTags);
}
return Boolean(persistTags);
Expand Down

0 comments on commit 4e6d77d

Please sign in to comment.