Skip to content

Commit d366543

Browse files
committed
Merge branch '2.0' into 3.0
2 parents 4eb9267 + c58711c commit d366543

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Scaffolding/Traits/DataObjectTypeTrait.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ protected function typeName()
5151
*/
5252
public function getDataObjectInstance()
5353
{
54-
if ($this->dataObjectInstance) {
55-
return $this->dataObjectInstance;
54+
if (!$this->dataObjectInstance) {
55+
$this->dataObjectInstance = Injector::inst()->get($this->dataObjectClass);
5656
}
57-
58-
return $this->dataObjectInstance = Injector::inst()->get($this->dataObjectClass);
57+
return $this->dataObjectInstance;
5958
}
6059

6160
/**

0 commit comments

Comments
 (0)