homeflowjs 1.0.44 → 1.0.45

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.
@@ -51,8 +51,8 @@ export const addSearchToLocalStorage = (search) => {
51
51
  * just update the the last search in local storage to have the search's page number if
52
52
  * it has one.
53
53
  */
54
- if ((JSON.stringify(searchWithoutPageNumber) === JSON.stringify(lastSearchWithoutPageNumber)) && theSearch?.page) {
55
- const lastSearchWithUpdatedPageNumber = { ...searchHistory[0], page: theSearch.page };
54
+ if (JSON.stringify(searchWithoutPageNumber) === JSON.stringify(lastSearchWithoutPageNumber)) {
55
+ const lastSearchWithUpdatedPageNumber = { ...searchHistory[0], page: theSearch?.page || 1 };
56
56
  searchHistory.shift();
57
57
  searchHistory.unshift(lastSearchWithUpdatedPageNumber);
58
58
  localStorage.setItem('searchHistory', JSON.stringify(searchHistory));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",