diff --git a/packages/core/build/bundle.js b/packages/core/build/bundle.js index e2aa1a652..bf268d2be 100644 --- a/packages/core/build/bundle.js +++ b/packages/core/build/bundle.js @@ -1,6 +1,6 @@ import './shared'; import './workers'; import './index'; -let xyz = window; +let xyz = typeof window =='undefined'?global:window; ; 'here.xyz.maps'.split('.').forEach((ns) => xyz = (xyz[ns] = xyz[ns] || {})); export default xyz; diff --git a/packages/core/build/intro.js b/packages/core/build/intro.js index 0c461b93e..02e0f787f 100644 --- a/packages/core/build/intro.js +++ b/packages/core/build/intro.js @@ -9,7 +9,7 @@ function define(dep, factory) { const xyz = here.xyz.maps; const sharedExports = {}; shared(sharedExports); - xyz.__workerURL = window.URL.createObjectURL(new Blob(['var shared={};('+shared+')(shared);('+worker+')(shared);'], {type: 'text/javascript'})); + xyz.__workerURL = URL.createObjectURL(new Blob(['var shared={};('+shared+')(shared);('+worker+')(shared);'], {type: 'text/javascript'})); factory(xyz, sharedExports, xyz.common); } }