mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Fixed last nonfunctional changes made earlier
Now iterates in the SnippetNoteDetail constructor the snippets and if linesHighlighted is not defined assigns an empty array
This commit is contained in:
@@ -10,7 +10,7 @@ function createSnippet (snippetFile) {
|
||||
name: 'Unnamed snippet',
|
||||
prefix: [],
|
||||
content: '',
|
||||
linesHighlighted: [],
|
||||
linesHighlighted: []
|
||||
}
|
||||
fetchSnippet(null, snippetFile).then((snippets) => {
|
||||
snippets.push(newSnippet)
|
||||
|
||||
@@ -88,7 +88,7 @@ function importAll (storage, data) {
|
||||
name: article.mode,
|
||||
mode: article.mode,
|
||||
content: article.content,
|
||||
linesHighlighted: article.linesHighlighted,
|
||||
linesHighlighted: article.linesHighlighted
|
||||
}]
|
||||
}
|
||||
notes.push(newNote)
|
||||
|
||||
@@ -118,8 +118,6 @@ function updateNote (storageKey, noteKey, input) {
|
||||
|
||||
if (noteData.type === 'SNIPPET_NOTE') {
|
||||
noteData.title
|
||||
if(noteData.linesHighlighted = null)
|
||||
noteData.linesHighlighted = [];
|
||||
}
|
||||
|
||||
Object.assign(noteData, input, {
|
||||
|
||||
Reference in New Issue
Block a user