From 32b26ac4f638272deefb31e2f5e5e35146d13921 Mon Sep 17 00:00:00 2001 From: Anton Reshetov Date: Thu, 7 Jul 2022 11:48:50 +0300 Subject: [PATCH 1/2] chore: add `perf` to commit rules --- commitlint.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commitlint.config.js b/commitlint.config.js index f4e5bebe..b2894ad6 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -10,6 +10,7 @@ module.exports = { 'docs', 'feat', 'fix', + 'perf', 'polish', 'refactor', 'release', From 9755ed16cf9a4e208d1f59459caeed01c602a105 Mon Sep 17 00:00:00 2001 From: Anton Reshetov Date: Thu, 7 Jul 2022 11:48:57 +0300 Subject: [PATCH 2/2] perf(editor): set value only if snippet id is changed --- src/renderer/components/editor/TheEditor.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/editor/TheEditor.vue b/src/renderer/components/editor/TheEditor.vue index c9784742..14507170 100644 --- a/src/renderer/components/editor/TheEditor.vue +++ b/src/renderer/components/editor/TheEditor.vue @@ -244,8 +244,9 @@ watch( () => props.lang, () => setLang() ) + watch( - () => props.modelValue, + () => props.snippetId, () => setValue() )