Skip to content

Commit

Permalink
use strict equality test
Browse files Browse the repository at this point in the history
Using `!= null` is a bit confusing: it took me a moment to realise that this would also be true if the value is `undefined`, which (I presume) is the value we should test for. Using non-strict equal tests is often discouraged for such reasons.
  • Loading branch information
Treora authored Jul 15, 2020
1 parent ce01efc commit 86854e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/redux-query-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function ReduxQuerySync({

function handleLocationUpdate(location) {
// Support history v5
if (location.location != null) {
if (location.location !== undefined) {
location = location.location;
}

Expand Down

0 comments on commit 86854e9

Please sign in to comment.