File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/renderer/components/modals/create-note-modal Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ export default {
57
57
if (! this .containsDupFiles ()) {
58
58
const noteType = this .getNoteType ();
59
59
60
+ ! this .files .length && this .addFile ();
61
+
60
62
this .files .forEach ((file , i ) => {
61
63
const filename = file .name || ` ${ noteType} file${ i + 1 } ` ;
62
64
const key = converter .filenameToKey (filename, file .language , noteType);
@@ -111,8 +113,13 @@ export default {
111
113
computed: {
112
114
... mapGetters ([' gistsSelected' ]),
113
115
isDisabled () {
114
- return ! this .files .length || this .files .some (file => ! / \S / .test (file .content ));
116
+ return (this .isBaseFileValid && this .files .length )
117
+ || (! this .isBaseFileValid && ! this .files .length )
118
+ || this .files .some (file => ! / \S / .test (file .content ));
115
119
},
120
+ isBaseFileValid () {
121
+ return Object .values (this .baseFile ).every (v => ` ${ v} ` .trim () !== ' ' );
122
+ }
116
123
},
117
124
};
118
125
</script >
You can’t perform that action at this time.
0 commit comments