We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11a3f4c commit 090a3f8Copy full SHA for 090a3f8
src/Fieldtypes/SeoProFieldtype.php
@@ -2,6 +2,8 @@
2
3
namespace Statamic\SeoPro\Fieldtypes;
4
5
+use Statamic\Contracts\Entries\Entry;
6
+use Statamic\Contracts\Taxonomies\Term;
7
use Statamic\Facades\Blueprint;
8
use Statamic\Fields\Fields as BlueprintFields;
9
use Statamic\Fields\Fieldtype;
@@ -51,7 +53,11 @@ protected function fields()
51
53
52
54
protected function fieldConfig()
55
{
- return SeoProFields::new($this->field()->parent())->getConfig();
56
+ if ($this->field()->parent() instanceof Entry || $this->field()->parent() instanceof Term) {
57
+ $parent = $this->field()->parent();
58
+ }
59
+
60
+ return SeoProFields::new($parent ?? null)->getConfig();
61
}
62
63
public function augment($data)
0 commit comments