Skip to content

Commit

Permalink
fix: avoid unnecessary pal loading when pal is already initialized
Browse files Browse the repository at this point in the history
aurelia-pal could be initialized before bootstrapping, such as test setup. This is to help aurelia/cli#1019 to avoid loading aurelia-pal-nodejs when aurelia-pal-browser is already loaded.
  • Loading branch information
3cp committed Jan 24, 2019
1 parent 9a3e872 commit 429c261
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Expand Up @@ -76,6 +76,8 @@ function createLoader() {
}

function initializePal(loader) {
if (isInitialized) return Promise.resolve();

let type;

const isRenderer = isNodeLike && (process.type === 'renderer' || process.versions['node-webkit']);
Expand Down

0 comments on commit 429c261

Please sign in to comment.