Skip to content

Commit

Permalink
Fix #1461 SearchBar resets when new map is opened
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Mar 15, 2017
1 parent 046df65 commit 25a1144
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/client/reducers/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

var {TEXT_SEARCH_RESULTS_LOADED, TEXT_SEARCH_RESULTS_PURGE, TEXT_SEARCH_RESET, TEXT_SEARCH_ADD_MARKER, TEXT_SEARCH_TEXT_CHANGE, TEXT_SEARCH_LOADING, TEXT_SEARCH_ERROR,
TEXT_SEARCH_NESTED_SERVICES_SELECTED, TEXT_SEARCH_CANCEL_ITEM} = require('../actions/search');
var {RESET_CONTROLS} = require('../actions/controls');

const assign = require('object-assign');
/**
Expand Down Expand Up @@ -90,7 +91,7 @@ function search(state = null, action) {
return assign({}, state, { results: null, error: null});
case TEXT_SEARCH_ADD_MARKER:
return assign({}, state, { markerPosition: action.markerPosition });
case TEXT_SEARCH_RESET:
case TEXT_SEARCH_RESET: case RESET_CONTROLS:
return null;
case TEXT_SEARCH_NESTED_SERVICES_SELECTED:
return assign({}, state, {
Expand Down

0 comments on commit 25a1144

Please sign in to comment.