jscheffl commented on code in PR #41516:
URL: https://github.com/apache/airflow/pull/41516#discussion_r1720822562
##########
airflow/www/static/js/components/RenderedJsonField.tsx:
##########
@@ -47,7 +47,7 @@ const JsonParse = (content: string | object) => {
contentJson = content;
}
contentFormatted = JSON.stringify(contentJson, null, 4);
- isJson = true;
+ isJson = typeof contentJson === "object"; // ensure numbers/bool are not
treated as JSON
Review Comment:
Okay, got a bit more complex now but extracted the utility function and
added a test for it.
--
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]