Skip to content
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

Fixes initialization of UASTViewer #413

Merged

Conversation

se7entyse7en
Copy link
Contributor

Closes #402.

There are two problems:

  1. UASTViewerPane checks only for flatUast and not
    initialFlatUast. This means that it can work only when the
    uast-viewer is used in controlled mode. This has been fixed by
    checking flatUast first and then fallback to initialFlatUast.
  2. UASTViewer component needs to be in uncontrolled mode, so it
    needs to use initialFlatUast. This has ben fixed by renaming
    flatUast into initialFlatUast.

There are two problems:
1. `UASTViewerPane` checks only for `flatUast` and not
`initialFlatUast`. This means that it can work only when the
`uast-viewer` is used in *controlled mode*. This has been fixed by
checking `flatUast` first and then fallback to `initialFlatUast`.
2. `UASTViewer` component needs to be in *uncontrolled mode*, so it
needs to use `initialFlatUast`. This has ben fixed by renaming
`flatUast` into `initialFlatUast`.

Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
Copy link
Contributor

@carlosms carlosms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@se7entyse7en se7entyse7en merged commit 8582449 into src-d:master Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UAST viewer does not render nodes when UAST arg is a string
3 participants