graphql(attachment): prevent null errors
This commit is contained in:
parent
65523606f1
commit
e584edeb16
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ module Extensions
|
|||
# is a lazy value (e.g., a Promise – like in our case)
|
||||
def after_resolve(value:, **_rest)
|
||||
if value.respond_to?(:map)
|
||||
attachments = value.map { after_resolve_attachment(_1) }
|
||||
attachments = value.map { after_resolve_attachment(_1) }.compact
|
||||
|
||||
if options[:as] == :single
|
||||
attachments.first
|
||||
|
|
Loading…
Reference in a new issue