Github user felizbear commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/796#issuecomment-208119840
@johnnyws looks good. a few minor comments
+ creating en empty object and assigning props to it is unconventional in
JS; normally, you would create an object together with the props:
```
// instead of
var notes = {};
notes.root = {
children : []
};
notes.flatList = [];
// better do
var notes = {
root: {children: []},
flatList: [],
setNotes: function() {}
}
```
+ I'd move `addNode` declaration outside of `setNotes` to prevent it from
being recreated on each step of `reduce`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---