Skip to content

fix: handle null as the first argument in identify#950

Merged
oscb merged 3 commits intomasterfrom
oscb/traitsFix
Oct 10, 2023
Merged

fix: handle null as the first argument in identify#950
oscb merged 3 commits intomasterfrom
oscb/traitsFix

Conversation

@oscb
Copy link
Copy Markdown
Contributor

@oscb oscb commented Sep 14, 2023

  • I've included a changeset (psst. run yarn changeset. Read about changesets here).

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 14, 2023

🦋 Changeset detected

Latest commit: 121a317

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@segment/analytics-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

options?: Options
callback?: Callback
} = {}
// It's a stack so it's reversed so that we go through each of the expected arguments
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a leetcode problem 😁

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It totally is

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I f'ing love this.

Comment thread packages/browser/src/core/arguments-resolver/__tests__/index.test.ts Outdated
Comment thread packages/browser/src/core/arguments-resolver/__tests__/index.test.ts Outdated
@oscb oscb requested a review from silesky September 29, 2023 17:58
callback?: Callback
} = {}
// It's a stack so it's reversed so that we go through each of the expected arguments
const orderStack: Array<keyof typeof values> = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the old TS array syntax???

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason eslint didn't like the new syntax :(

Copy link
Copy Markdown
Contributor

@silesky silesky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@oscb oscb closed this Oct 10, 2023
@oscb oscb reopened this Oct 10, 2023
@oscb oscb merged commit c0dadc7 into master Oct 10, 2023
@oscb oscb deleted the oscb/traitsFix branch October 10, 2023 19:18
@github-actions github-actions bot mentioned this pull request Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

analytics.identify sends traits through context when userId is null (version 1.53.0)

4 participants