Skip to content

Commit ea27f8e

Browse files
jbloxhamkamilogorek
authored andcommitted
feat: Extract prototyped data in extractUserData (getsentry#2247)
1 parent d64568a commit ea27f8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node/src/handlers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function extractUserData(req: { [key: string]: any }, keys: boolean | string[]):
143143
const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_KEYS;
144144

145145
attributes.forEach(key => {
146-
if ({}.hasOwnProperty.call(req.user, key)) {
146+
if (key in req.user) {
147147
user[key] = (req.user as { [key: string]: string })[key];
148148
}
149149
});

0 commit comments

Comments
 (0)