Preserve class when adding uneval objects #1624
This fixes a bug that is the root cause of rstudio/shiny#1178. When adding an
# When including aes() in the ggplot() call, class is preserved p <- ggplot(mtcars, aes(wt, mpg)) class(p$mapping) #  "uneval" # When adding aes() in the ggplot() call, class is lost p <- ggplot(mtcars) + aes(wt, mpg) class(p$mapping) #  "list"
This PR preserves the class of the object.
Current coverage is 65.54%
@@ master #1624 diff @@ ======================================== Files 158 158 Lines 5546 5548 +2 Methods 0 0 Branches 0 0 ======================================== + Hits 3634 3636 +2 Misses 1912 1912 Partials 0 0
hadley merged commit
Aug 12, 2016
3 checks passed
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.