Copilot commented on code in PR #1011:
URL:
https://github.com/apache/skywalking-banyandb/pull/1011#discussion_r2944480116
##########
ui/src/components/Read/index.vue:
##########
@@ -251,7 +251,7 @@ orderBy:
if (field.value[fieldTypes[fieldType]] === null) {
dataItem[name] = 'Null';
} else {
- dataItem[name] = field.value[fieldTypes[fieldType]]?.value ||
field.value[fieldTypes[fieldType]];
+ dataItem[name] = field.value[fieldTypes[fieldType]]?.value ??
field.value[fieldTypes[fieldType]];
}
Review Comment:
This line correctly switches to nullish coalescing so numeric 0 from
`*.value` is preserved, but the same `?.value || ...` pattern a few lines above
for tag values still treats `0` as falsy (e.g., TAG_TYPE_INT with value 0) and
will fall back to the wrapper object, causing incorrect UI display. Consider
applying the same `??` approach there (and any similar value-unwrapping) to
fully address 0-value rendering and keep behavior consistent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]