Skip to content

Commit 60be7ac

Browse files
committed
Handle case where voice commands are set to an empty array
1 parent 0b18a02 commit 60be7ac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/js/src/manager/screen/menu/_MenuReplaceUtilities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class _MenuReplaceUtilities {
342342
const shouldCellIncludeSecondaryImage = cell.getSecondaryArtwork() !== null && cell.getSecondaryArtwork().getImageRPC() !== null && _MenuReplaceUtilities.shouldCellIncludeSecondaryImageFromCell(cell, fileManager, windowCapability);
343343
const secondaryIcon = shouldCellIncludeSecondaryImage ? cell.getSecondaryArtwork().getImageRPC() : null;
344344

345-
if (cell.getVoiceCommands() !== null) {
345+
if (Array.isArray(cell.getVoiceCommands()) && cell.getVoiceCommands().length > 0) {
346346
console.warn('MenuManagerBase - Setting voice commands for submenu cells is not supported. The voice commands will not be set.');
347347
}
348348

0 commit comments

Comments
 (0)