mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-18 07:05:56 +08:00
fix: number attributes not showing up in raw view (#4541)
This commit is contained in:
parent
c75a44c620
commit
0dffd86287
@ -12,7 +12,7 @@ import { useCopyLogLink } from 'hooks/logs/useCopyLogLink';
|
|||||||
// hooks
|
// hooks
|
||||||
import { useIsDarkMode } from 'hooks/useDarkMode';
|
import { useIsDarkMode } from 'hooks/useDarkMode';
|
||||||
import { FlatLogData } from 'lib/logs/flatLogData';
|
import { FlatLogData } from 'lib/logs/flatLogData';
|
||||||
import { isEmpty, isUndefined } from 'lodash-es';
|
import { isEmpty, isNumber, isUndefined } from 'lodash-es';
|
||||||
import {
|
import {
|
||||||
KeyboardEvent,
|
KeyboardEvent,
|
||||||
MouseEvent,
|
MouseEvent,
|
||||||
@ -73,7 +73,14 @@ function RawLogView({
|
|||||||
|
|
||||||
const attributesValues = updatedSelecedFields
|
const attributesValues = updatedSelecedFields
|
||||||
.map((field) => flattenLogData[field.name])
|
.map((field) => flattenLogData[field.name])
|
||||||
.filter((attribute) => !isUndefined(attribute) && !isEmpty(attribute));
|
.filter((attribute) => {
|
||||||
|
// loadash isEmpty doesnot work with numbers
|
||||||
|
if (isNumber(attribute)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !isUndefined(attribute) && !isEmpty(attribute);
|
||||||
|
});
|
||||||
|
|
||||||
let attributesText = attributesValues.join(' | ');
|
let attributesText = attributesValues.join(' | ');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user