fix: fix prettier

release
Nolan Lawson 2019-03-23 09:18:50 -07:00
parent d9eda6a7a5
commit 3c0c0caffc
3 changed files with 12 additions and 7 deletions

View File

@ -3,10 +3,10 @@ import store from '../../store'
import data from '../../../../data/all' import data from '../../../../data/all'
const nimbleEmojiIndex = new NimbleEmojiIndex(data); const nimbleEmojiIndex = new NimbleEmojiIndex(data)
function getEmojiData(skinTone) { function getEmojiData(skinTone) {
store.update({skin: skinTone}) store.update({ skin: skinTone })
return nimbleEmojiIndex.search('thumbsup')[0] return nimbleEmojiIndex.search('thumbsup')[0]
} }

View File

@ -39,7 +39,12 @@ export default class NimbleEmojiIndex {
if (skin_variations) { if (skin_variations) {
this.emojis[id] = {} this.emojis[id] = {}
for (let skinTone = 1; skinTone <= 6; skinTone++) { for (let skinTone = 1; skinTone <= 6; skinTone++) {
this.emojis[id][skinTone] = getSanitizedData({id, skin: skinTone}, skinTone, this.set, this.data) this.emojis[id][skinTone] = getSanitizedData(
{ id, skin: skinTone },
skinTone,
this.set,
this.data,
)
} }
} else { } else {
this.emojis[id] = getSanitizedData(id, null, this.set, this.data) this.emojis[id] = getSanitizedData(id, null, this.set, this.data)
@ -81,7 +86,7 @@ export default class NimbleEmojiIndex {
if (this.customEmojisList != custom) if (this.customEmojisList != custom)
this.addCustomToPool(custom, this.originalPool) this.addCustomToPool(custom, this.originalPool)
const skinTone = store.get('skin') || 1; const skinTone = store.get('skin') || 1
maxResults || (maxResults = 75) maxResults || (maxResults = 75)
include || (include = []) include || (include = [])

View File

@ -115,9 +115,9 @@ function getData(emoji, skin, set, data) {
} }
if ( if (
(set && (set && variationData[`has_img_${set}`] == undefined) ||
variationData[`has_img_${set}`] == undefined || variationData[`has_img_${set}`] ||
variationData[`has_img_${set}`]) || !set !set
) { ) {
emojiData.skin_tone = skin emojiData.skin_tone = skin