Skip to content

Commit 329bdb2

Browse files
author
Karpenko, Oleksandr
committed
MAGETWO-52958: Better Semantic for UI Components
1 parent 58047f8 commit 329bdb2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Ui/Config/Data.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ public function __construct(
8484
$this->componentName = $componentName;
8585
$this->argumentInterpreter = $argumentInterpreter;
8686
$this->cacheId = static::CACHE_ID . '_' . $componentName;
87-
$this->initData();
8887
}
8988

9089
/**
@@ -121,7 +120,7 @@ private function initData()
121120
*/
122121
public function merge(array $config)
123122
{
124-
$this->data = array_replace_recursive($this->data, $config);
123+
$this->data = array_replace_recursive($this->get(), $config);
125124
}
126125

127126
/**
@@ -133,6 +132,9 @@ public function merge(array $config)
133132
*/
134133
public function get($path = null, $default = null)
135134
{
135+
if (empty($this->data)) {
136+
$this->initData();
137+
}
136138
if ($path === null) {
137139
return $this->data;
138140
}

0 commit comments

Comments
 (0)