Skip to content

Commit

Permalink
chore: merge branch 'master' of github.com:antonreshetov/massCode
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Apr 15, 2020
2 parents 1375fd7 + 7e86082 commit af766d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/components/snippets/SnippetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<script>
import { mapGetters, mapState } from 'vuex'
import cloneDeep from 'lodash-es/cloneDeep'
import debounce from 'lodash-es/debounce'
import MonacoEditor from '@/components/editor/MonacoEditor.vue'
import MarkdownPreview from '@/components/editor/MarkdownPreview.vue'
import SnippetTabs from '@/components/snippets/SnippetTabs.vue'
Expand Down Expand Up @@ -202,13 +203,12 @@ export default {
setWatcher () {
this.unWatch = this.$watch(
'localSnippet',
() => {
debounce(() => {
this.$emit('edit')
const ids = [this.localSnippet._id]
const payload = this.localSnippet
this.$store.dispatch('snippets/updateSnippets', { ids, payload })
},
}, 300),
{ deep: true }
)
},
Expand Down

0 comments on commit af766d4

Please sign in to comment.