Skip to content

Commit ee799c7

Browse files
committed
bug #29 Fix data-theme attribut (cedriclombardot)
This PR was merged into the main branch. Discussion ---------- Fix data-theme attribut | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | | License | MIT hasAttribute return a boolean not attribute value Commits ------- 9d9b593 Fix data-theme attribut
2 parents b57f3d8 + 9d9b593 commit ee799c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Swup/Resources/assets/src/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default class extends Controller {
2323
cache: this.element.hasAttribute('data-cache'),
2424
animateHistoryBrowsing: this.element.hasAttribute('data-animate-history-browsing'),
2525
plugins: [
26-
'slide' === this.element.hasAttribute('data-theme') ? new SwupSlideTheme() : new SwupFadeTheme(),
26+
'slide' === this.element.getAttribute('data-theme') ? new SwupSlideTheme() : new SwupFadeTheme(),
2727
new SwupFormsPlugin(),
2828
],
2929
};

0 commit comments

Comments
 (0)