Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

prevent potential runtime errors..#540

Open
qw87rt wants to merge 1 commit intoTheRealJoelmatic:mainfrom
qw87rt:patch-2
Open

prevent potential runtime errors..#540
qw87rt wants to merge 1 commit intoTheRealJoelmatic:mainfrom
qw87rt:patch-2

Conversation

@qw87rt
Copy link
Copy Markdown
Contributor

@qw87rt qw87rt commented Jun 8, 2024

if (video) video.volume = 0;
if (video) video.pause();
if (video) video.remove();

can be written as
if (video) {
video.volume = 0;
video.pause();
video.remove();
}
to ensure it does not fail when video is null.


if (video) video.volume = 0;
if (video) video.pause();
if (video) video.remove();

can be written as 
    if (video) {
        video.volume = 0;
        video.pause();
        video.remove();
    }
to ensure it does not fail when video is null.

****    ****    ****    ****    ****    ****    ****    ****    ****    ****    ****
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant