Skip to content

Commit e9b7181

Browse files
committed
add fallback for snippet retrieval
1 parent a91863e commit e9b7181

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const app = new Moon({
7878
hooks: {
7979
init: function() {
8080
this.callMethod('update_search_index')
81-
this.set('snippets', JSON.parse(ipc.sendSync('get_snippets')))
81+
this.set('snippets', JSON.parse(ipc.sendSync('get_snippets')) || this.get('snippets'))
8282
},
8383
mounted: function() {
8484
$('#search').val('')

0 commit comments

Comments
 (0)