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 @@ -121,14 +121,15 @@ protected function _toHtml()
121
121
return '' ;
122
122
}
123
123
124
- $ dependsJson = $ this ->_getDependsJson ();
125
- $ configOptions = $ this ->_configOptions ? $ this ->_jsonEncoder ->encode ($ this ->_configOptions ) : null ;
126
- $ configOptionsStr = $ configOptions ? ', ' . $ configOptions : '' ;
127
- $ paramsStr = $ dependsJson . $ configOptionsStr ;
124
+ $ params = $ this ->_getDependsJson ();
125
+
126
+ if ($ this ->_configOptions ) {
127
+ $ params .= ', ' . $ this ->_jsonEncoder ->encode ($ this ->_configOptions );
128
+ }
128
129
129
130
return "<script>
130
- require(['mage/adminhtml/form'], function(){
131
- new FormElementDependenceController( {$ paramsStr });
131
+ require(['mage/adminhtml/form'], function(){
132
+ new FormElementDependenceController( {$ params });
132
133
});
133
134
</script> " ;
134
135
}
You can’t perform that action at this time.
0 commit comments