File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v[0-9]+.[0-9]+.[0-9]+'
7- # branches: ["main "]
7+ branches : ["feat/allinone "]
88
99jobs :
1010
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default function GenerateMeshDialog(props) {
4747 return [ ] ;
4848 }
4949 return Object . entries ( layerSettings ) . reduce ( ( prev , [ key , val ] ) => {
50- const count = project . _layers . filter ( layer => ( layer . surface === key ) ) . length ;
50+ const count = project . _layers ? .filter ( layer => ( layer . surface === key ) ) ? .length || 0 ;
5151 return [
5252 ...prev ,
5353 {
@@ -199,7 +199,7 @@ export default function GenerateMeshDialog(props) {
199199
200200 { jobState . phase === 'settings' ? (
201201 < React . Fragment >
202- < Alert sx = { { mb : 5 } } > Detected { project . _layers . length } layers</ Alert >
202+ < Alert sx = { { mb : 5 } } > Detected { project . _layers ? .length || 0 } layers</ Alert >
203203
204204 < Typography sx = { { mb : 3 } } variant = "h3" > Global Settings</ Typography >
205205 { settingGroups . map ( setting => (
@@ -277,7 +277,7 @@ export default function GenerateMeshDialog(props) {
277277 { jobState . status ? (
278278 < Typography > { jobState . status } </ Typography >
279279 ) : (
280- < Typography > Generating { jobState . count } of { project . _layers . length } meshes...</ Typography >
280+ < Typography > Generating { jobState . count } of { project . _layers ? .length || 0 } meshes...</ Typography >
281281 ) }
282282 </ Stack >
283283 ) : null }
Original file line number Diff line number Diff line change @@ -259,7 +259,11 @@ export default function Course() {
259259 </ Box >
260260 ) : (
261261 < Stack sx = { { p : 3 } } spacing = { 3 } >
262- < Button onClick = { handleGenerateMeshes } fullWidth variant = "contained" > Generate Meshes</ Button >
262+ { project . _layers ?. length ? (
263+ < Button onClick = { handleGenerateMeshes } fullWidth variant = "contained" > Generate Meshes</ Button >
264+ ) : (
265+ < Typography textAlign = "center" color = "textSecondary" > You must generate an SVG before you can create meshes</ Typography >
266+ ) }
263267 </ Stack >
264268 ) }
265269 </ Box >
You can’t perform that action at this time.
0 commit comments