homeflowjs 0.13.27 → 0.13.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/hf-initialize.jsx
CHANGED
@@ -121,8 +121,9 @@ const hfInitialize = () => {
|
|
121
121
|
|| pageRoute === 'countries#show'
|
122
122
|
|| pageRoute === 'branches#properties'
|
123
123
|
) {
|
124
|
-
|
124
|
+
let searchFromFragment = parseFragment(window.location.pathname);
|
125
125
|
const defaultStatus = store.getState().app.themePreferences.default_search_status;
|
126
|
+
const place = Homeflow.get('place');
|
126
127
|
|
127
128
|
if (!isEmpty(searchFromFragment)) {
|
128
129
|
if (defaultStatus && !searchFromFragment.status) {
|
@@ -132,11 +133,19 @@ const hfInitialize = () => {
|
|
132
133
|
const branchID = Homeflow.get('branch_id');
|
133
134
|
if (branchID) searchFromFragment.branch_id = branchID;
|
134
135
|
|
136
|
+
if (place) {
|
137
|
+
store.dispatch(setPlace(place));
|
138
|
+
searchFromFragment = {
|
139
|
+
...searchFromFragment,
|
140
|
+
q: place.name + (place.county_name ? `, ${place.county_name}` : ''),
|
141
|
+
place,
|
142
|
+
};
|
143
|
+
}
|
144
|
+
|
135
145
|
store.dispatch(setInitialSearch(searchFromFragment));
|
136
146
|
store.dispatch(setSearch(searchFromFragment));
|
137
147
|
}
|
138
148
|
|
139
|
-
const place = Homeflow.get('place');
|
140
149
|
if (place) {
|
141
150
|
const initialSearchSet = Object.keys(store.getState().search?.initialSearch)?.length;
|
142
151
|
store.dispatch(setPlace(place));
|
package/package.json
CHANGED