From 1fb7620f0944f0c85ebf238a85d21c67b4ecd57d Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Fri, 24 Apr 2020 16:47:40 -0300 Subject: [PATCH 1/2] Fix concurrency problem while fetching integration data --- app/ui/client/lib/codeMirror/codeMirrorComponent.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/ui/client/lib/codeMirror/codeMirrorComponent.js b/app/ui/client/lib/codeMirror/codeMirrorComponent.js index 42d5c9c50f38..3c728deb9826 100644 --- a/app/ui/client/lib/codeMirror/codeMirrorComponent.js +++ b/app/ui/client/lib/codeMirror/codeMirrorComponent.js @@ -16,6 +16,15 @@ Template.CodeMirror.onRendered(async function() { const textarea = this.find('textarea'); const editor = CodeMirror.fromTextArea(textarea, options); + this.autorun((c) => { + const { code } = Template.currentData(); + if (code === undefined) { + return; + } + c.stop(); + editor.setValue(code); + }); + CodeMirrors[this.data.id || 'code-mirror-textarea'] = editor; if (this.data && this.data.editorOnBlur) { this.data.editorOnBlur(this.data.name); From 78fb8a65f3e50d0cd1c7c596497ed4f2c7cf7c2a Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Fri, 8 May 2020 03:47:47 -0300 Subject: [PATCH 2/2] Fix emoji picker search --- app/emoji/client/emojiPicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/emoji/client/emojiPicker.js b/app/emoji/client/emojiPicker.js index 7894ab736efc..410bbfa5682c 100644 --- a/app/emoji/client/emojiPicker.js +++ b/app/emoji/client/emojiPicker.js @@ -58,7 +58,7 @@ function getEmojisBySearchTerm(searchTerm) { if (searchRegExp.test(current)) { const emojiObject = emoji.list[current]; - const { emojiPackage, shortnames } = emojiObject; + const { emojiPackage, shortnames = [] } = emojiObject; let tone = ''; current = current.replace(/:/g, ''); const alias = shortnames[0] !== undefined ? shortnames[0].replace(/:/g, '') : shortnames[0];