mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
chore: Use .includes and .startsWith, not .indexOf (#7936)
Easier to read than the diverse collection of `=== 0` and `!== -1` and `> -1` tests.
This commit is contained in:
@@ -325,7 +325,7 @@ export class ShortcutRegistry {
|
||||
const modifierKeyCode = (
|
||||
ShortcutRegistry.modifierKeys as AnyDuringMigration
|
||||
)[modifier];
|
||||
if (modifiers.indexOf(modifierKeyCode) > -1) {
|
||||
if (modifiers.includes(modifierKeyCode)) {
|
||||
if (serializedKey !== '') {
|
||||
serializedKey += '+';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user