Cannot read property 'emojis' of undefined
See original GitHub issueFull 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:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
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.
Thanks @s-moran 🎉