Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting an empty voice command array should clear the list of voice commands #440

Closed
renonick87 opened this issue May 24, 2021 · 0 comments · Fixed by #441
Closed

Setting an empty voice command array should clear the list of voice commands #440

renonick87 opened this issue May 24, 2021 · 0 comments · Fixed by #441
Labels
bug Something isn't working

Comments

@renonick87
Copy link
Contributor

Bug Report

Sending an empty voice command array to screenManager.steVoiceCommands() should clear the list of voice commands displayed in the HMI. This is because the statement used to check if the provided voice commands are equal to the current voice commands does not take an empty array into consideration.
!voiceCommands.map((vc, index) => vc.equals(this._voiceCommands[index])).includes(false)
This statement returns false for an empty array and stops the manager from continuing.

Reproduction Steps
  1. Call screenManager.setVoiceCommands([]); with an empty array.
Expected Behavior

The library should delete all available voice commands.

Observed Behavior

The action fails, the message Voice commands list non-existent or matches the current voice commands is logged to the console, and and no voice commands are deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants