Skip to content

Commit

Permalink
[BUGFIX beta] Fix issue with IE9 compatibility.
Browse files Browse the repository at this point in the history
A past refactor left `AutoLocation` in a broken state under IE9. This
fixes that error and adds a (somewhat silly) test.
  • Loading branch information
Robert Jackson committed Sep 8, 2016
1 parent 945d81a commit a28f4d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ember-routing/lib/location/auto_location.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default EmberObject.extend({
@property global
@default environment.global
*/
global: environment.global,
global: environment.window,

/**
@private
Expand Down
8 changes: 8 additions & 0 deletions packages/ember-routing/tests/location/auto_location_test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { environment } from 'ember-environment';
import { get, run, assign } from 'ember-metal';
import AutoLocation from '../../location/auto_location';
import {
Expand Down Expand Up @@ -60,6 +61,13 @@ QUnit.module('Ember.AutoLocation', {
}
});

QUnit.test('AutoLocation should have the `global`', function(assert) {
let location = AutoLocation.create();

assert.ok(location.global, 'has a global defined');
assert.strictEqual(location.global, environment.window, 'has the environments window global');
});

QUnit.test('AutoLocation should return concrete implementation\'s value for `getURL`', function() {
expect(1);

Expand Down

0 comments on commit a28f4d7

Please sign in to comment.