Skip to content

Commit bbdfa3a

Browse files
committed
minor #1258 [Doc] Fix preConnect/connect inversion in "disconnect()" doc examples (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Doc] Fix preConnect/connect inversion in "disconnect()" doc examples Following symfony/ux#1227 i found other similar cases of callback inversion in the documentation. Commits ------- 3f8218f5 Fix preConnect/connect inversion in "disconnect()" doc examples
2 parents 5ebdaa6 + fac39c1 commit bbdfa3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ Stimulus controller:
156156
157157
disconnect() {
158158
// You should always remove listeners when the controller is disconnected to avoid side-effects
159-
this.element.removeEventListener('swup:pre-connect', this._onConnect);
160-
this.element.removeEventListener('swup:connect', this._onPreConnect);
159+
this.element.removeEventListener('swup:connect', this._onConnect);
160+
this.element.removeEventListener('swup:pre-connect', this._onPreConnect);
161161
}
162162
163163
_onPreConnect(event) {

0 commit comments

Comments
 (0)