diff --git a/package.json b/package.json index fa37dea..b1ec90e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "mugen-quick-versus-launcher", "author": "neolao", "license": "MIT", - "version": "0.5.2", + "version": "0.5.3", "description": "Mugen launcher for Quick Versus", "keywords": [ "mugen", diff --git a/src/character/useCharacterName.hook.js b/src/character/useCharacterName.hook.js index 79d5234..704857a 100644 --- a/src/character/useCharacterName.hook.js +++ b/src/character/useCharacterName.hook.js @@ -21,5 +21,14 @@ export default function useCharacterName(character) { if (definition.Info.displayname) { return ini.unsafe(definition.Info.displayname); } - return ini.unsafe(definition.Info.name); + if (definition.Info.name) { + return ini.unsafe(definition.Info.name); + } + if (definition.Info.Displayname) { + return ini.unsafe(definition.Info.Displayname); + } + if (definition.Info.Name) { + return ini.unsafe(definition.Info.Name); + } + return "Unknown"; } diff --git a/src/stage/useStageName.hook.js b/src/stage/useStageName.hook.js index 5245150..f4d7527 100644 --- a/src/stage/useStageName.hook.js +++ b/src/stage/useStageName.hook.js @@ -21,5 +21,14 @@ export default function useStageName(stage) { if (definition.Info.displayname) { return ini.unsafe(definition.Info.displayname); } - return ini.unsafe(definition.Info.name); + if (definition.Info.name) { + return ini.unsafe(definition.Info.name); + } + if (definition.Info.Displayname) { + return ini.unsafe(definition.Info.Displayname); + } + if (definition.Info.Name) { + return ini.unsafe(definition.Info.Name); + } + return "Unknown"; }