Fix span expansion when operation name is null
This commit is contained in:
parent
1db4a33e05
commit
da150d8a6a
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ class OperationDefinitionContext extends DefinitionContext {
|
||||||
@override
|
@override
|
||||||
FileSpan get span {
|
FileSpan get span {
|
||||||
if (TYPE == null) return selectionSet.span;
|
if (TYPE == null) return selectionSet.span;
|
||||||
var out = TYPE.span.expand(NAME.span);
|
var out = NAME == null ? TYPE.span : TYPE.span.expand(NAME.span);
|
||||||
out = directives.fold<FileSpan>(out, (o, d) => o.expand(d.span));
|
out = directives.fold<FileSpan>(out, (o, d) => o.expand(d.span));
|
||||||
return out.expand(selectionSet.span);
|
return out.expand(selectionSet.span);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue