Skip to content

Commit a7be59e

Browse files
authored
fix(ember): Avoid pulling in utils at build time (#9221)
It seems some have an issue because of this, and maybe this is overkill anyhow. So I just inline a minimal version of this into the build file here instead, let's see if that fixes it. Fixes #9215
1 parent 3c98e45 commit a7be59e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

packages/ember/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
const fs = require('fs');
33
const crypto = require('crypto');
44

5-
const { dropUndefinedKeys } = require('@sentry/utils');
6-
75
function readSnippet(fileName) {
86
return fs.readFileSync(`${__dirname}/vendor/${fileName}`, 'utf8');
97
}
@@ -103,3 +101,15 @@ function isScalar(val) {
103101
function isPlainObject(obj) {
104102
return typeof obj === 'object' && obj.constructor === Object && obj.toString() === '[object Object]';
105103
}
104+
105+
function dropUndefinedKeys(obj) {
106+
const newObj = {};
107+
108+
for (const key in obj) {
109+
if (obj[key] !== undefined) {
110+
newObj[key] = obj[key];
111+
}
112+
}
113+
114+
return newObj;
115+
}

0 commit comments

Comments
 (0)