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.
2 parents 4eb9267 + c58711c commit d366543Copy full SHA for d366543
src/Scaffolding/Traits/DataObjectTypeTrait.php
@@ -51,11 +51,10 @@ protected function typeName()
51
*/
52
public function getDataObjectInstance()
53
{
54
- if ($this->dataObjectInstance) {
55
- return $this->dataObjectInstance;
+ if (!$this->dataObjectInstance) {
+ $this->dataObjectInstance = Injector::inst()->get($this->dataObjectClass);
56
}
57
-
58
- return $this->dataObjectInstance = Injector::inst()->get($this->dataObjectClass);
+ return $this->dataObjectInstance;
59
60
61
/**
0 commit comments