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.

Using emojisToShowFilter seems to crash the picker

See original GitHub issue
      <picker :emojis-to-show-filter="emojisToShowFilter"/>
methods: {
    emojisToShowFilter (emoji) {
      console.log(emoji.short_names[0])
      return true
    }
}

Creates the following error TypeError: Cannot read property 'push' of undefined at VueComponent.created (emoji-mart.js?28c6:3422)

It seems that in emoji-mart.js, the this.categories is undefined when I use emojisToShowFilter() it happens in the created function.

    RECENT_CATEGORY.emojis = this.recentEmojis;
    CUSTOM_CATEGORY.emojis = this.customEmojis;

    this.categories.push(RECENT_CATEGORY);
    (_categories = this.categories).push.apply(_categories, (0, _toConsumableArray3.default)(categories));
    this.categories.push(CUSTOM_CATEGORY);

If I remove :emojis-to-show-filter from the template the this.categories exists as an empty array.

I debugged and iterated inside the var categories = this.parsedData.categories.map(function (c) {}) Inside this map function everything works as intended, it’s calling my function, my function returns true, the emojis var gets populated properly. Category by category.

I’m not sure what’s going on.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
RedKagecommented, May 28, 2018

I think … it’s because recentEmojis does not contain emojis object: it contains strings.

0:"+1"
1:"grinning"
2:"kissing_heart"
3:"heart_eyes"
4:"laughing"
5:"stuck_out_tongue_winking_eye"
6:"sweat_smile"
7:"joy"
8:"scream"

Indeed there is no parsedData for each entry.

The issue is there: the recentEmojis object does not contain emojis objects. It needs to contain emojis object as the emojisToShowFilter expects an emoji object.

1reaction
RedKagecommented, Oct 1, 2021

@RedKage Is there any alternative solution for excluding specific emoji?

It’s been a while, I moved on to another UI and have now simple unicode emoji picker on desktop. I re-read this issue and frankly I don’t remember anything!

Looks like this project is kinda dead though. Maybe worth a look at some other forks or an entirely different package to handle emojis

Read more comments on GitHub >

github_iconTop Results From Across the Web

File Picker/Pickerhost.exe crashing every minute causing ...
Hi minangkabu,. I deleted the file in the Local Folder and its not coming up in the error reporting log since, so it...
Read more >
SwiftUI - Ipad crashes when form e… | Apple Developer Forums
If you have a form like the below, to show some fields just when a specific option of a Picker is selected (so...
Read more >
App crashes when SwiftUI view with Picker disappears (since ...
It seems to be a bug in iOS 16.x while using Picker with "wheel style", I had the same issue in my app...
Read more >
Canva is crashing or freezing when I use it - Canva Help Center
When Canva crashes or freezes, it might be due to an outdated browser or app version, intermittent internet connection, or ongoing app issues....
Read more >
[Solved] App crashes when using Image Picker in iOS 12 [Aug ...
Same Error. Testing on Android: Works as expected. Seems to be an iOS problem. 1 Like.
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