diff --git a/src/adapter/runs/TimeSettingsURLHandler.js b/src/adapter/runs/TimeSettingsURLHandler.js index b50807866e..48884b3e52 100644 --- a/src/adapter/runs/TimeSettingsURLHandler.js +++ b/src/adapter/runs/TimeSettingsURLHandler.js @@ -107,7 +107,9 @@ define([ } this.last = params; - if (params.clock === 'fixed' && params.bounds) { + if (!params.timeSystem) { + this.updateQueryParams(); + } else if (params.clock === 'fixed' && params.bounds) { if (!this.time.timeSystem() || this.time.timeSystem().key !== params.timeSystem) { diff --git a/src/adapter/runs/TimeSettingsURLHandlerSpec.js b/src/adapter/runs/TimeSettingsURLHandlerSpec.js index 0d1bce7ecc..0fd7b1a3ab 100644 --- a/src/adapter/runs/TimeSettingsURLHandlerSpec.js +++ b/src/adapter/runs/TimeSettingsURLHandlerSpec.js @@ -132,6 +132,20 @@ define([ }; }); + it("initializes with missing time system", function () { + // This handles an odd transitory case where a url does not include + // a timeSystem. It's generally only experienced by those who + // based their code on the tutorial before it specified a time + // system. + search['tc.mode'] = 'clockA'; + search['tc.timeSystem'] = undefined; + search['tc.startDelta'] = '123'; + search['tc.endDelta'] = '456'; + + // We don't specify behavior right now other than "don't break." + expect(initialize).not.toThrow(); + }); + it("can initalize fixed mode from location", function () { search['tc.mode'] = 'fixed'; search['tc.timeSystem'] = 'timeSystemA';