Merge pull request #127 from hyperspacedev/HD-21-emoji-picker
[HD-21] Stop emoji picker event crashes
This commit is contained in:
commit
e835307dc2
|
@ -8,7 +8,12 @@ interface IEmojiPickerProps extends PickerProps {
|
||||||
|
|
||||||
export class EmojiPicker extends Component<IEmojiPickerProps, any> {
|
export class EmojiPicker extends Component<IEmojiPickerProps, any> {
|
||||||
retrieveFromLocal() {
|
retrieveFromLocal() {
|
||||||
return JSON.parse(localStorage.getItem("emojis") as string);
|
let emojiStorage = localStorage.getItem("emojis");
|
||||||
|
if (emojiStorage != null) {
|
||||||
|
return JSON.parse(emojiStorage as string);
|
||||||
|
} else {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in New Issue