brumi1024 commented on a change in pull request #3734:
URL: https://github.com/apache/hadoop/pull/3734#discussion_r761789217
##########
File path:
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-jhs-container.js
##########
@@ -45,9 +45,13 @@ export default DS.JSONAPISerializer.extend({
},
normalizeArrayResponse(store, primaryModelClass, payload/*, id,
requestType*/) {
-
payload = payload["containerLogsInfo"]
+ if (payload && !Ember.isArray(payload) && !Ember.isEmpty(payload)) {
Review comment:
Nit: a cleaner (and more JS like :D) solution would be to simply say
`payload = [].concat(payload["containerLogsInfo])`
This way there is no need for the custom isEmpty/isArray methods.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]