diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-01-29 11:07:12 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-01-29 11:26:51 +0000 |
commit | 4b960674fd5190d25b039444aa079f921bbee376 (patch) | |
tree | acdba2b15a1bd0354ab7fc7294b9306bf39dfeb5 | |
parent | 833a66f7c0844d9bf7c355ba9d4c2fb6cb0a655b (diff) |
Guard against a possible null history.state.
Sometimes IE11 appears to have one, some interaction with appcache
iframe? Not sure, but not worth tracking it down.
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index b94e6e813..2406b65e3 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -1030,7 +1030,7 @@ $.extend(fixmystreet.set_up, { // rather than the 'fake history' replaceState call that sets the // initial state, because the map hasn't been loaded at that point. // Also, filters might be changed before a report click. - if ('state' in history && !history.state.mapState) { + if ('state' in history && history.state && !history.state.mapState) { history.state.mapState = around_map_state; // NB can't actually modify current state directly, needs a // call to replaceState() |