Last active
April 27, 2020 19:05
-
-
Save IPRIT/9883188f19b1a1cc5555a0ea32025691 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/store/rabota/search/actions.js:restoreQueryString | |
| let location = state.location; | |
| if (query[ 'subway_station' ] && getObjectValueByPath(state, 'location.subway_station.id') !== ensureNumber( query[ 'subway_station' ] )) { | |
| location = { | |
| subway_station: { id: ensureNumber( query[ 'subway_station' ] ) } | |
| }; | |
| } else if (query[ 'location.latitude' ] && query[ 'location.longitude' ] && getObjectValueByPath(state, 'location.geopoint.latitude') !== ensureNumber( query[ 'location.latitude' ] ) && getObjectValueByPath(state, 'location.geopoint.longitude') !== ensureNumber( query[ 'location.longitude' ] )) { | |
| location = { | |
| geopoint: { | |
| latitude: ensureNumber( query[ 'location.latitude' ] ), | |
| longitude: ensureNumber( query[ 'location.longitude' ] ), | |
| } | |
| }; | |
| } else if (query[ 'region' ] && getObjectValueByPath(state, 'location.region.id') !== ensureNumber( query[ 'region' ] )) { | |
| location = { | |
| region: { id: ensureNumber( query[ 'region' ] ) } | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment