question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'emojis' of undefined

See original GitHub issue

Full error description:

ERROR TypeError: Cannot read property 'emojis' of undefined at PickerComponent.push../node_modules/@ctrl/ngx-emoji-mart/__ivy_ngcc__/fesm5/ctrl-ngx-emoji-mart.js.PickerComponent.ngOnInit (ctrl-ngx-emoji-mart.js:1054)

This error shows when I set showEmojiPicker = true

html:

<emoji-mart [style]="{ position: 'absolute', bottom: '5px', right: '5px' }" class="emoji-mart" set="emojione" (emojiSelect)="addEmoji($event)" [skin]="6" include="['people']" showPreview='false' *ngIf="showEmojiPicker" [emojiSize]="36" isNative="true"></emoji-mart>

I’m using node 12 and angular 9 (beta 12).

Error disappears when I load all categories, by removing include="['people']".

Possible cause:

There is var categoriesToLoadFirst = 3; (line 1051) and later: 1054 line: var lastActiveCategoryEmojis = this.categories[categoriesToLoadFirst - 1].emojis.slice();

If I try to load one category only, error shows. I have added second category and error disappeared.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jameskentTXcommented, Oct 24, 2019

How stupid I am? 😃 I used [include]="['people']" now, but error still shows.

‘recent’ category is really important and with two categories everything is working. So “one category error” is not really a problem.

0reactions
scttcpercommented, Dec 8, 2019

Thanks @s-moran 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'emoji' of undefined
Here the value of reaction is undefined so you are getting the error.You are trying to read the emoji property of an undefined...
Read more >
TypeError: Cannot read property 'emoji' of undefined #3898
Well, after trying to get it to work whenever I use an .awaitreactions() function and then it follows to collected.emoji it decides to...
Read more >
TypeError: Cannot read property 'emoji' of undefined-discord.js
Here the value of reaction is undefined so you are getting the error.You are trying to read the emoji property of an undefined...
Read more >
typeerror: cannot read properties of undefined (reading 'cache')
TypeError : Cannot read properties of undefined (reading 'cache') ... const emojis = message.guild.emojis.cache.size; let Embed = new MessageEmbed() .
Read more >
Collectors - discord.js Guide
However, the drawback of using this method is that you cannot do ... need some questions and answers to choose from, so here's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found