-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test/aggmds counts #1064
base: master
Are you sure you want to change the base?
Test/aggmds counts #1064
Changes from 9 commits
bbbe0e9
0804746
e7a55e4
a7479b2
d91a9a3
aa06637
21fc1bc
97cacc0
3cf7ebe
7715199
9a4884d
808bf95
802c52d
8c6cf03
b058283
717ee25
3f0a1a6
cf799b5
50b485f
5feeb6e
61b5290
43cc673
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ export const renderFieldContent = (content: any, contentType: 'string'|'paragrap | |
if (Array.isArray(content)) { | ||
return content.join(', '); | ||
} | ||
return content.toLocaleString(); | ||
return content ? content.toLocaleString() : 'N/A'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use valueIfNotAvailable to handle missing values? Just like what we were doing in existing codes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That works, however, it requires the configuration to ensure all fields are using |
||
case 'paragraphs': | ||
return content.split('\n').map((paragraph, i) => <p key={i}>{paragraph}</p>); | ||
case 'link': | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice I like this as this won't crash undef values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two questions: does a missing
content
value need to be type matched? eg: if an int is missing the portal code should be looking for 0 as opposed toN/A
? also how about__manifest
? If there is none, that should be [] as opposed toN/A
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I have updated the expression