Skip to content

Commit

Permalink
fix: Fix window pollution in browser
Browse files Browse the repository at this point in the history
Fixes shaka-project/eme_logger#25

Also bumps version to 1.0.1
  • Loading branch information
joeyparrish committed Nov 15, 2021
1 parent a379010 commit e933df6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "trace-anything",
"description": "Shim and trace calls to absolutely anything",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/joeyparrish/trace-anything",
"author": "Joey Parrish",
"maintainers": [
Expand Down
6 changes: 5 additions & 1 deletion trace-anything.js
Original file line number Diff line number Diff line change
Expand Up @@ -1140,4 +1140,8 @@ TraceAnything._newElementObserver = null;
*/
TraceAnything._nextGeneratedId = new Map();

exports = {TraceAnything};
// In a nodejs environment, export the module. In a browser, don't.
// See https://github.com/google/eme_logger/issues/25
if (typeof module !== 'undefined') {
module.exports = {TraceAnything};
}

0 comments on commit e933df6

Please sign in to comment.