mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-04-24 15:26:52 -05:00
Improve original SplatNet gear name matching
There was an item with the name "Annaki Drive Tee " (with an extra space at the end) which didn't match the Inkipedia data. This change also makes the comparison case insensitive just in case.
This commit is contained in:
parent
742b244c33
commit
a8a31dabd4
|
|
@ -2,10 +2,12 @@ const skills = require('./data/skills');
|
|||
const inkipediaGear = require('./data/inkipediaGear');
|
||||
|
||||
function getOriginalGear(gear) {
|
||||
if (!gear)
|
||||
if (!gear || !gear.name)
|
||||
return;
|
||||
|
||||
let originalGear = inkipediaGear[gear.kind].find(ig => ig.name == gear.name);
|
||||
let name = gear.name.toLowerCase().trim();
|
||||
|
||||
let originalGear = inkipediaGear[gear.kind].find(ig => ig.name.toLowerCase() == name);
|
||||
|
||||
if (!originalGear)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user