mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = class Pokemon {
|
||||
constructor(store, data) {
|
||||
this.store = store;
|
||||
this.id = data.id;
|
||||
const slugName = firstUpperCase(data.name).replace(new RegExp(`${this.slug}-?`, 'i'), '').replace(/-/g, ' ');
|
||||
const slugName = firstUpperCase(data.name).replace(/-/g, ' ');
|
||||
this.name = data.names.length
|
||||
? data.names.find(entry => entry.language.name === 'en').name
|
||||
: slugName;
|
||||
|
||||
Reference in New Issue
Block a user