Skip to content

Commit

Permalink
fix(aurelia): switch window loader check to platform loader check
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Oct 11, 2015
1 parent 4bc7516 commit 471d8c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/aurelia.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
CompositionEngine,
Animator
} from 'aurelia-templating';
import {DOM} from 'aurelia-pal';
import {DOM, PLATFORM} from 'aurelia-pal';

function preventActionlessFormSubmit() {
DOM.addEventListener('submit', evt => {
Expand All @@ -38,7 +38,7 @@ export class Aurelia {
use: FrameworkConfiguration;

constructor(loader?: Loader, container?: Container, resources?: ViewResources) {
this.loader = loader || new window.AureliaLoader();
this.loader = loader || new PLATFORM.Loader();
this.container = container || new Container();
this.resources = resources || new ViewResources();
this.use = new FrameworkConfiguration(this);
Expand Down
3 changes: 2 additions & 1 deletion test/aurelia.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Loader} from 'aurelia-loader';
import {BindingLanguage, ViewSlot, ViewResources, CompositionEngine} from 'aurelia-templating';
import {FrameworkConfiguration} from '../src/framework-configuration';
import {initialize} from 'aurelia-pal-browser';
import {PLATFORM} from 'aurelia-pal';

describe('aurelia', () => {
beforeAll(() => initialize());
Expand All @@ -12,7 +13,7 @@ describe('aurelia', () => {

it("should have good defaults", () => {
let mockLoader = {};
window.AureliaLoader = function(){
PLATFORM.Loader = function(){
return mockLoader;
}
let aurelia = new Aurelia();
Expand Down

0 comments on commit 471d8c5

Please sign in to comment.