Skip to content

Commit

Permalink
Support undefined attributes in private/custom fields (#102)
Browse files Browse the repository at this point in the history
* Support undefined attributes in private/custom fields

* Add undef field for testing
  • Loading branch information
tore-statsig authored Sep 24, 2021
1 parent b403e0a commit b4684b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ declare module 'statsig-node' {
country?: string;
locale?: string;
appVersion?: string;
custom?: Record<string, string | number | boolean | Array<string>>;
privateAttributes?: Record<string, string | number | boolean | Array<string>>;
custom?: Record<string, string | number | boolean | Array<string> | undefined>;
privateAttributes?: Record<string, string | number | boolean | Array<string> | undefined>;
};

/**
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/StatsigE2ETest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ describe('Verify e2e behavior of the SDK with mocked network', () => {
};
const randomUser = {
userID: 'random',
privateAttributes: {
email: undefined,
}
};
let postedLogs = {};
beforeEach(() => {
Expand Down

0 comments on commit b4684b1

Please sign in to comment.