File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
app/code/Magento/Backend/Block/Widget/Form/Element Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,18 @@ protected function _toHtml()
120120 if (!$ this ->_depends ) {
121121 return '' ;
122122 }
123- return '<script>
124- require(["mage/adminhtml/form"], function(){
125- new FormElementDependenceController( ' .
126- $ this ->_getDependsJson () .
127- ($ this ->_configOptions ? ', ' .
128- $ this ->_jsonEncoder ->encode (
129- $ this ->_configOptions
130- ) : '' ) . '); });</script> ' ;
123+
124+ $ params = $ this ->_getDependsJson ();
125+
126+ if ($ this ->_configOptions ) {
127+ $ params .= ', ' . $ this ->_jsonEncoder ->encode ($ this ->_configOptions );
128+ }
129+
130+ return "<script>
131+ require(['mage/adminhtml/form'], function(){
132+ new FormElementDependenceController( {$ params });
133+ });
134+ </script> " ;
131135 }
132136
133137 /**
You can’t perform that action at this time.
0 commit comments