Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile: prevent accidental "undefined" as profile identifier #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abarisain
Copy link
Member

Si on utilise pas typescript, il est relativement facile de mettre l'identifier "undefined" sur un profil en passant une variable mal initialisée.

Le contrat API etant d'explicitement passer null pour enlever l'identifier, je pense qu'il faut qu'on refuse plutot que convertir en null.
Autant on peut se dire que identify() pourrait etre interprété en logout, autant si on fait identify(myID) mais que myID n'est accidentellement pas defined, c'est plus dur a débugger

Deux autres pistes:

  • Ajouter un log ?
  • Bloquer les "usual suspects" coté natif (undefined, null, (null), nil, [object Object]) pour être sur qu'on oublie pas ça dans d'autres plugins

@abarisain abarisain force-pushed the feature/prevent_undefined_profile branch from 1b64b6d to 4e42f1d Compare August 23, 2024 07:06
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.

1 participant