Make tools shortcuts case insensitive (#1532) (#1533)

This commit is contained in:
Esteban 2020-05-02 23:55:59 -03:00 committed by GitHub
parent dd7aa29297
commit 7522c48453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,9 @@ export const shapesShortcutKeys = SHAPES.map((shape, index) => [
export function findShapeByKey(key: string) {
return (
SHAPES.find((shape, index) => {
return shape.value[0] === key || key === (index + 1).toString();
return (
shape.value[0] === key.toLowerCase() || key === (index + 1).toString()
);
})?.value || "selection"
);
}