We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdf7814 commit 963f5d3Copy full SHA for 963f5d3
src/estimators/directive/index.ts
@@ -28,7 +28,8 @@ export default function (options?: {}): ComplexityEstimator {
28
});
29
30
return (args: ComplexityEstimatorArgs) => {
31
- const values = getDirectiveValues(directive, args.field.astNode);
+ const astNode = (args.field && args.field.astNode) || {};
32
+ const values = getDirectiveValues(directive, astNode);
33
34
// Ignore if no directive set
35
if (!values) {
0 commit comments