1
0
Fork 0
mirror of https://github.com/cheeaun/phanpy.git synced 2025-03-11 08:28:50 +01:00

Another guard for corrupted shortcuts

This commit is contained in:
Lim Chee Aun 2023-02-19 10:42:56 +08:00
parent 2df67f37a3
commit a27bdbc69b

View file

@ -210,6 +210,7 @@ function ShortcutsSettings() {
{shortcuts.map((shortcut, i) => {
const key = i + Object.values(shortcut);
const { type } = shortcut;
if (!SHORTCUTS_META[type]) return null;
let { icon, title } = SHORTCUTS_META[type];
if (typeof title === 'function') {
title = title(shortcut);