This repository was archived by the owner on Jan 14, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +5
-5
lines changed
snippet-detail-multi-file Expand file tree Collapse file tree 5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ function getMenu (app, mainWindow) {
72
72
buttonLabel : 'Export'
73
73
} ,
74
74
paths => {
75
- if ( paths [ 0 ] ) {
75
+ if ( paths && paths [ 0 ] ) {
76
76
const folder = paths [ 0 ]
77
77
mainWindow . webContents . send ( 'snippet:exportAll' , folder )
78
78
}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export default class SnippetDetailMultiFile extends React.Component {
73
73
properties : [ 'openDirectory' ]
74
74
} ,
75
75
paths => {
76
- if ( paths [ 0 ] ) {
76
+ if ( paths && paths [ 0 ] ) {
77
77
const folder = paths [ 0 ]
78
78
exportSnippetAPI ( exportSnippet , folder )
79
79
toast . success ( 'Snippet exported!' )
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export default class SnippetDetail extends React.Component {
70
70
properties : [ 'openDirectory' ]
71
71
} ,
72
72
paths => {
73
- if ( paths [ 0 ] ) {
73
+ if ( paths && paths [ 0 ] ) {
74
74
const folder = paths [ 0 ]
75
75
exportSnippetAPI ( exportSnippet , folder )
76
76
toast . success ( 'Snippet exported!' )
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export default class SnippetItemMultiFiles extends React.Component {
81
81
properties : [ 'openDirectory' ]
82
82
} ,
83
83
paths => {
84
- if ( paths [ 0 ] ) {
84
+ if ( paths && paths [ 0 ] ) {
85
85
const folder = paths [ 0 ]
86
86
exportSnippetAPI ( exportSnippet , folder )
87
87
toast . success ( 'Snippet exported!' )
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ export default class SnippetItem extends React.Component {
151
151
properties : [ 'openDirectory' ]
152
152
} ,
153
153
paths => {
154
- if ( paths [ 0 ] ) {
154
+ if ( paths && paths [ 0 ] ) {
155
155
const folder = paths [ 0 ]
156
156
exportSnippetAPI ( exportSnippet , folder )
157
157
toast . success ( 'Snippet exported!' )
You can’t perform that action at this time.
0 commit comments