File tree Expand file tree Collapse file tree 3 files changed +15
-18
lines changed
components/widgets/info-bar Expand file tree Collapse file tree 3 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -259,10 +259,17 @@ Promise.all(components).then((values) => {
259259 this . app_state . bytes . received = this . conn . bytes . received ;
260260 this . app_state . has3DCanvas = flecs . has3DCanvas ;
261261
262- if ( msg . components && msg . components [ "flecs.stats.WorldSummary" ] ) {
263- const summary = msg . components [ "flecs.stats.WorldSummary" ] ;
264- this . app_state . world_info = summary ;
265- this . app_state . build_info = summary . build_info ;
262+ if ( msg . components ) {
263+ if ( msg . components [ "flecs.stats.WorldSummary" ] ) {
264+ const summary = msg . components [ "flecs.stats.WorldSummary" ] ;
265+ this . app_state . world_info = summary ;
266+ this . app_state . build_info = summary . build_info ;
267+ }
268+
269+ const buildInfo = msg . components [ "flecs.core.BuildInfo" ] ;
270+ if ( buildInfo ) {
271+ this . app_state . build_info = buildInfo ;
272+ }
266273 }
267274 } . bind ( this )
268275 } ) ;
Original file line number Diff line number Diff line change @@ -15,12 +15,7 @@ const props = defineProps({
1515});
1616
1717const config = computed (() => {
18- const wi = props .app_state .world_info ;
19- if (! wi) {
20- return {};
21- }
22-
23- const bi = wi .build_info ;
18+ const bi = props .app_state .build_info ;
2419 if (bi) {
2520 if (bi .sanitize ) {
2621 return " sanitize" ;
@@ -30,7 +25,7 @@ const config = computed(() => {
3025 return " release" ;
3126 }
3227 } else {
33- return undefined ;
28+ return " unknown "
3429 }
3530});
3631
Original file line number Diff line number Diff line change @@ -14,16 +14,11 @@ const props = defineProps({
1414});
1515
1616const version = computed (() => {
17- const wi = props .app_state .world_info ;
18- if (! wi) {
19- return " ?.?.?" ;
20- }
21-
22- const bi = wi .build_info ;
17+ const bi = props .app_state .build_info ;
2318 if (bi) {
2419 return bi .version ;
2520 } else {
26- return undefined ;
21+ return " ?.?.? " ;
2722 }
2823});
2924
You can’t perform that action at this time.
0 commit comments