From 7cc484b3ecaaaca40e68e4c338be29efb05f215d Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 6 Jul 2023 15:20:24 -0400 Subject: [PATCH] Fix nullable types --- src/plugins/syncPlay/core/Manager.js | 4 ++-- src/scripts/dom.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/syncPlay/core/Manager.js b/src/plugins/syncPlay/core/Manager.js index ee1e3e3ae7..9f25f44608 100644 --- a/src/plugins/syncPlay/core/Manager.js +++ b/src/plugins/syncPlay/core/Manager.js @@ -246,7 +246,7 @@ class Manager { /** * Handles a playback command from the server. - * @param {Object} cmd The playback command. + * @param {Object|null} cmd The playback command. */ processCommand(cmd) { if (cmd === null) return; @@ -294,7 +294,7 @@ class Manager { /** * Handles a group state change. - * @param {Object} update The group state update. + * @param {Object|null} update The group state update. */ processStateChange(update) { if (update === null || update.State === null || update.Reason === null) return; diff --git a/src/scripts/dom.js b/src/scripts/dom.js index dadd3b4fe4..cd0fd71849 100644 --- a/src/scripts/dom.js +++ b/src/scripts/dom.js @@ -65,7 +65,7 @@ function containsAnyClass(classList, classNames) { * Returns parent of element with one of specified class names. * @param {HTMLElement} elem - Element whose parent need to find. * @param {(string|Array)} classNames - Class name or array of class names. - * @returns {HTMLElement} Parent with one of specified class names. + * @returns {HTMLElement|null} Parent with one of specified class names. */ export function parentWithClass(elem, classNames) { // accept both string and array passed in