diff --git a/src/public/app/widgets/note_type.js b/src/public/app/widgets/note_type.js index 269856e55..b26977ead 100644 --- a/src/public/app/widgets/note_type.js +++ b/src/public/app/widgets/note_type.js @@ -73,7 +73,7 @@ export default class NoteTypeWidget extends NoteContextAwareWidget { const $typeLink = $('') .attr("data-note-type", noteType.type) .append(' ') - .append($('').text(noteType.title)) + .append($('').text(noteType.title)) .on('click', e => { const type = $typeLink.attr('data-note-type'); const noteType = NOTE_TYPES.find(nt => nt.type === type); @@ -85,11 +85,11 @@ export default class NoteTypeWidget extends NoteContextAwareWidget { $typeLink.addClass("selected"); } - this.$noteTypeDropdown.append($typeLink); - - if (noteType.type !== 'code') { + if (noteType.type === 'code') { this.$noteTypeDropdown.append(''); } + + this.$noteTypeDropdown.append($typeLink); } for (const mimeType of await mimeTypesService.getMimeTypes()) {