Merge pull request #127 from hyperspacedev/HD-21-emoji-picker

[HD-21] Stop emoji picker event crashes
This commit is contained in:
Marquis Kurt 2019-11-24 16:07:27 -05:00 committed by GitHub
commit e835307dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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() {