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: teardown happening during initial setup #134

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

caffeinated-pixels
Copy link
Contributor

Description

This fixes an issue that can occur if the AdvertisingProvider unmounts during the initial GPT setup.

I've added a new state value (isInitialSetupComplete), which gets set when the setup completes and prevents omponentWillUnmount from calling the teardown function. This ensures we don't create a race condition between the setup and teardown, which can break the display ads.

@caffeinated-pixels caffeinated-pixels merged commit 47f515e into master Feb 6, 2024
2 checks passed
@caffeinated-pixels caffeinated-pixels deleted the fix-teardown-during-setup branch February 6, 2024 20:08
thedaviddias pushed a commit that referenced this pull request Feb 6, 2024
## Description
This fixes an issue that can occur if the AdvertisingProvider unmounts
during the initial GPT setup.

I've added a new state value (isInitialSetupComplete), which gets set
when the setup completes and prevents `omponentWillUnmount` from calling
the teardown function. This ensures we don't create a race condition
between the setup and teardown, which can break the display ads.

Co-authored-by: Stephen Gill <[email protected]>
thedaviddias pushed a commit that referenced this pull request Feb 7, 2024
## [4.2.9](v4.2.8...v4.2.9) (2024-02-07)

### Bug Fixes

* correctly get aps config for queued ad ids ([#133](#133)) ([e377243](e377243))
* teardown happening during initial setup ([#134](#134)) ([05f2bb8](05f2bb8))
thedaviddias pushed a commit that referenced this pull request Feb 7, 2024
## [4.2.9](v4.2.8...v4.2.9) (2024-02-07)

### Bug Fixes

* correctly get aps config for queued ad ids ([#133](#133)) ([e377243](e377243))
* teardown happening during initial setup ([#134](#134)) ([05f2bb8](05f2bb8))
caffeinated-pixels added a commit that referenced this pull request Feb 8, 2024
## Description
- Follow-up from PR #134
- Adds in the missing setState for updating isInitialSetupComplete. I
must of deleted it by accident when I was removing all my console logs 😞

Co-authored-by: Stephen Gill <[email protected]>
thedaviddias pushed a commit that referenced this pull request Feb 8, 2024
## [4.2.11](v4.2.10...v4.2.11) (2024-02-08)

### Bug Fixes

* missing setState for isInitialSetupComplete ([#135](#135)) ([70eeef7](70eeef7)), closes [#134](#134)
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.

2 participants