Skip to content

Commit

Permalink
fix display name
Browse files Browse the repository at this point in the history
  • Loading branch information
neolao committed Feb 23, 2020
1 parent 4cb03ba commit 52f9b62
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 10 additions & 1 deletion src/character/useCharacterName.hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
11 changes: 10 additions & 1 deletion src/stage/useStageName.hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

0 comments on commit 52f9b62

Please sign in to comment.