Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

prevent potential runtime errors.. #540

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

Conversation

qw87rt
Copy link
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