Permalink
Browse files

fix: avoid unnecessary pal loading when pal is already initialized

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...
huochunpeng committed Jan 24, 2019
1 parent 9a3e872 commit 429c261aae43648461f1f7ef4cfa0bf293c2f353
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/index.js
@@ -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']);

0 comments on commit 429c261

Please sign in to comment.