Skip to content

Commit

Permalink
fix(timeslider): use initial time from url when available
Browse files Browse the repository at this point in the history
  • Loading branch information
mrMetalWood committed Oct 19, 2020
1 parent 2e1f02c commit bd7ca90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scripts/reducers/globe/time.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {SET_GLOBE_TIME, SetGlobeTimeAction} from '../../actions/set-globe-time';
import {parseUrl} from '../../libs/globe-url-parameter';
import config from '../../config/main';

const initialState = config.globe.time;
// get initial state from url or fallback to default state in config
const globeState = parseUrl()?.globeState || config.globe;
const initialState = globeState.time;

function timeReducer(
state: number = initialState,
Expand Down

0 comments on commit bd7ca90

Please sign in to comment.