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 a225a11 + e701de3 commit 5a764b2Copy full SHA for 5a764b2
app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
@@ -124,14 +124,18 @@ protected function _toHtml()
124
if (!$this->_depends) {
125
return '';
126
}
127
- return '<script>
128
- require(["mage/adminhtml/form"], function(){
129
- new FormElementDependenceController(' .
130
- $this->_getDependsJson() .
131
- ($this->_configOptions ? ', ' .
132
- $this->_jsonEncoder->encode(
133
- $this->_configOptions
134
- ) : '') . '); });</script>';
+
+ $params = $this->_getDependsJson();
+ if ($this->_configOptions) {
+ $params .= ', ' . $this->_jsonEncoder->encode($this->_configOptions);
+ }
+ return "<script>
135
+require(['mage/adminhtml/form'], function(){
136
+ new FormElementDependenceController({$params});
137
+});
138
+</script>";
139
140
141
/**
0 commit comments