Skip to content

Commit 78fa049

Browse files
committed
fallback for direct layer() calls
1 parent 99e7a56 commit 78fa049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/layer.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ layer <- function(geom = NULL, stat = NULL,
173173
# adjust the legend draw key if requested
174174
geom <- set_draw_key(geom, key_glyph %||% params$key_glyph)
175175

176-
fr_call <- layer_class$constructor %||% frame_call(call_env)
176+
fr_call <- layer_class$constructor %||% frame_call(call_env) %||% current_call()
177177

178178
ggproto("LayerInstance", layer_class,
179179
constructor = fr_call,

0 commit comments

Comments
 (0)