Fix nullable types
This commit is contained in:
@@ -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;
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user