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 81d967c commit 8caf151Copy full SHA for 8caf151
src/Field/Page/PageNumChildrenField.php
@@ -36,13 +36,15 @@ public function build(FieldConfig $config)
36
$config->addArgument(new InputField([
37
'name' => self::firstArgumentName,
38
'type' => new BooleanType(),
39
- 'default' => false,
40
]));
41
}
42
43
public function resolve($value, array $args, ResolveInfo $info)
44
{
45
- $visible = $args[self::firstArgumentName];
+ $visible = false;
+ if (isset($args[self::firstArgumentName])) {
46
+ $visible = $args[self::firstArgumentName];
47
+ }
48
if ($visible) return $value->numChildren($visible);
49
return $value->numChildren;
50
0 commit comments