File tree 1 file changed +7
-6
lines changed
app/code/Magento/Backend/Block/Widget/Form/Element
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -125,14 +125,15 @@ protected function _toHtml()
125
125
return '' ;
126
126
}
127
127
128
- $ dependsJson = $ this ->_getDependsJson ();
129
- $ configOptions = $ this ->_configOptions ? $ this ->_jsonEncoder ->encode ($ this ->_configOptions ) : null ;
130
- $ configOptionsStr = $ configOptions ? ', ' . $ configOptions : '' ;
131
- $ paramsStr = $ dependsJson . $ configOptionsStr ;
128
+ $ params = $ this ->_getDependsJson ();
129
+
130
+ if ($ this ->_configOptions ) {
131
+ $ params .= ', ' . $ this ->_jsonEncoder ->encode ($ this ->_configOptions );
132
+ }
132
133
133
134
return "<script>
134
- require(['mage/adminhtml/form'], function(){
135
- new FormElementDependenceController( {$ paramsStr });
135
+ require(['mage/adminhtml/form'], function(){
136
+ new FormElementDependenceController( {$ params });
136
137
});
137
138
</script> " ;
138
139
}
You can’t perform that action at this time.
0 commit comments