Skip to content

Commit 654a080

Browse files
committed
Remove use of Array.flat to lower Node requirement for tests
1 parent 4b9c2eb commit 654a080

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/js/src/manager/screen/_VoiceCommandManagerBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class _VoiceCommandManagerBase extends _SubManagerBase {
152152
* @returns {Boolean} - indicate whether all voice commands are unique
153153
*/
154154
_arePendingVoiceCommandsUnique (voiceCommands) {
155-
const allVoiceCommands = voiceCommands.map(voiceCommand => voiceCommand.getVoiceCommands()).flat();
155+
const allVoiceCommands = voiceCommands.reduce((array, voiceCommand) => array.concat(voiceCommand.getVoiceCommands()), []);
156156
return new Set(allVoiceCommands).size === allVoiceCommands.length;
157157
}
158158

0 commit comments

Comments
 (0)