Gaurd against ranges being undefined

pull/2083/head
Andrew Watkins 2017-10-09 12:26:08 -07:00
parent 50ecc5d757
commit caa3060950
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import _ from 'lodash'
import normalizer from 'src/normalizers/dashboardTime'
export const loadLocalStorage = errorsQueue => {
@ -19,7 +20,7 @@ export const loadLocalStorage = errorsQueue => {
return {}
}
const ranges = normalizer(state.dashTimeV1.ranges)
const ranges = normalizer(_.get(state, ['dashTimeV1', 'ranges'], []))
const dashTimeV1 = {ranges}
window.localStorage.setItem(