Skip to content

Commit

Permalink
fixed(core): resolve incorrect module initialization in non-browser e…
Browse files Browse the repository at this point in the history
…nvironments like Node.js

Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Oct 9, 2024
1 parent 4d7c9f4 commit 0866112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/build/bundle.js
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion packages/core/build/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 0866112

Please sign in to comment.