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

fix: crash in analytics.reset for aws pinpoint #397

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

Conversation

renzil
Copy link

@renzil renzil commented Aug 14, 2023

Title: Calling analytics.reset leads to a crash on analytics-plugin-aws-pinpoint in the browser
Browser: Chrome Version 115.0.5790.114 (Official Build) (x86_64)
OS: OSX 12.6.5

Steps to reproduce:

  1. Setup a vanilla HTML in browser implementation of analytics and analytics-plugin-aws-pinpoint
  2. Call analytics.reset

Result: Crash with the following stacktrace

storage is not defined
ReferenceError: storage is not defined
at Object.reset (https://my.bundle.min.js:2099:7)
at https://my.bundle.min.js:2196:9319

Analysis:
The storage object is not defined but is being used to delete a key in the reset callback of the pinpoint plugin. I have just directly used the removeItem import and I am getting results as expected. Please verify if this is the correct fix @DavidWells

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