Skip to content

Commit b40ffba

Browse files
committed
reduce size
1 parent 20b41ce commit b40ffba

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

packages/core/src/utils/normalizationHints.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,12 @@ export function setNormalizationDepthOverrideHint(obj: object, depth: number): v
1818
}
1919

2020
/** @internal */
21-
export function hasSkipNormalizationHint(value: unknown): value is object {
22-
if (typeof value !== 'object' || value === null) {
23-
return false;
24-
}
25-
if (!Object.prototype.hasOwnProperty.call(value, SENTRY_SKIP_NORMALIZATION)) {
26-
return false;
27-
}
21+
export function hasSkipNormalizationHint(value: object) {
2822
return Boolean((value as Record<symbol, unknown>)[SENTRY_SKIP_NORMALIZATION]);
2923
}
3024

3125
/** @internal */
32-
export function getNormalizationDepthOverrideHint(value: unknown): number | undefined {
33-
if (typeof value !== 'object' || value === null) {
34-
return undefined;
35-
}
36-
if (!Object.prototype.hasOwnProperty.call(value, SENTRY_OVERRIDE_NORMALIZATION_DEPTH)) {
37-
return undefined;
38-
}
26+
export function getNormalizationDepthOverrideHint(value: object): number | undefined {
3927
const v = (value as Record<symbol, unknown>)[SENTRY_OVERRIDE_NORMALIZATION_DEPTH];
4028
return typeof v === 'number' ? v : undefined;
4129
}

0 commit comments

Comments
 (0)