Skip to content

Commit 4837e7d

Browse files
committed
more robust strategy for grabbing subplot objects from schema, fixes #1156
1 parent a75613b commit 4837e7d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
## BUG FIXES
1111

12+
Fixed algorithm for coercing the proposed layout to the plot schema (see #1156).
1213

1314
# 4.7.1
1415

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ verify_attr_spec <- function(p) {
369369

370370
verify_attr <- function(proposed, schema) {
371371
for (attr in names(proposed)) {
372-
attrSchema <- schema[[sub("[2-9]+$", "", attr)]]
372+
attrSchema <- schema[[attr]] %||% schema[[sub("[0-9]+$", "", attr)]]
373373
# if schema is missing (i.e., this is an un-official attr), move along
374374
if (is.null(attrSchema)) next
375375

0 commit comments

Comments
 (0)