mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Fix
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = class Pokemon {
|
|||||||
constructor(store, data) {
|
constructor(store, data) {
|
||||||
this.store = store;
|
this.store = store;
|
||||||
this.id = data.id;
|
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
|
this.name = data.names.length
|
||||||
? data.names.find(entry => entry.language.name === 'en').name
|
? data.names.find(entry => entry.language.name === 'en').name
|
||||||
: slugName;
|
: slugName;
|
||||||
|
|||||||
Reference in New Issue
Block a user