File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,14 @@ changeRouteTo :
160
160
-> ( Model , Cmd Msg )
161
161
changeRouteTo currentModel url =
162
162
let
163
- attempteQuery (( newModel, cmd ) as pair) =
163
+ attempteQuery ( newModel, cmd ) =
164
+ let
165
+ -- We intentially throw away Cmd
166
+ -- because we don't want to perform any effects
167
+ -- in this cases where route itself doesn't change
168
+ noEffects =
169
+ ( newModel, Cmd . none )
170
+ in
164
171
case ( currentModel. route, newModel. route ) of
165
172
( Route . Packages arg1, Route . Packages arg2 ) ->
166
173
if
@@ -173,7 +180,7 @@ changeRouteTo currentModel url =
173
180
submitQuery newModel ( newModel, cmd )
174
181
175
182
else
176
- pair
183
+ noEffects
177
184
178
185
( Route . Options arg1, Route . Options arg2 ) ->
179
186
if
@@ -186,14 +193,14 @@ changeRouteTo currentModel url =
186
193
submitQuery newModel ( newModel, cmd )
187
194
188
195
else
189
- pair
196
+ noEffects
190
197
191
198
( a, b ) ->
192
199
if a /= b then
193
200
submitQuery newModel ( newModel, cmd )
194
201
195
202
else
196
- pair
203
+ noEffects
197
204
in
198
205
case Route . fromUrl url of
199
206
Nothing ->
You can’t perform that action at this time.
0 commit comments