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 js errors on scroll #33

Merged
merged 4 commits into from
Dec 6, 2020
Merged

Fix js errors on scroll #33

merged 4 commits into from
Dec 6, 2020

Conversation

haszari
Copy link
Owner

@haszari haszari commented Dec 6, 2020

Fixes #18

There were JS errors if user scrolls the page when the audio was still loading.

This PR fixes by only calling setPlaybackLevel if the looper is valid. The new optional chaining operator is used maybenull?.thing().

To get access to ?., this PR also updates wp-scripts to the latest (which is a good thing to do anyway).

@haszari haszari merged commit 4e24c24 into master Dec 6, 2020
@haszari haszari deleted the fix/js-errors-on-scroll branch December 6, 2020 00:42
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.

JS errrors on scroll - f.loopers[n].setPlaybackLevel
1 participant