File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
app/code/Magento/PageBuilder/Component/Form/Element Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,10 @@ class Wysiwyg extends \Magento\Ui\Component\Form\Element\Wysiwyg
45
45
* @param array $config
46
46
* @param PageBuilderConfig|null $pageBuilderConfig
47
47
* @param bool $overrideSnapshot
48
- * @param Repository $assetRepo
48
+ * @param Repository|null $assetRepo
49
49
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
50
50
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
51
51
* @SuppressWarnings(PHPMD.NPathComplexity)
52
- * @throws \Magento\Framework\Exception\NoSuchEntityException
53
52
*/
54
53
public function __construct (
55
54
ContextInterface $ context ,
@@ -66,10 +65,10 @@ public function __construct(
66
65
Repository $ assetRepo = null
67
66
) {
68
67
$ this ->assetRepo = $ assetRepo ?: ObjectManager::getInstance ()->get (Repository::class);
69
- $ wysiwygConfigData = isset ( $ config ['wysiwygConfigData ' ]) ? $ config [ ' wysiwygConfigData ' ] : [];
68
+ $ wysiwygConfigData = $ config ['wysiwygConfigData ' ] ?? [];
70
69
71
70
// If a dataType is present we're dealing with an attribute
72
- if (isset ($ config ['dataType ' ])) {
71
+ if (isset ($ config ['dataType ' ]) && $ context -> getNamespace () === ' category_form ' ) {
73
72
try {
74
73
$ attribute = $ attrRepository ->get ($ data ['name ' ]);
75
74
You can’t perform that action at this time.
0 commit comments