File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/code/Magento/Catalog/ViewModel/Product Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 77
88use Magento \Catalog \Helper \Data ;
99use Magento \Framework \App \Config \ScopeConfigInterface ;
10+ use Magento \Framework \App \ObjectManager ;
1011use Magento \Framework \DataObject ;
1112use Magento \Framework \Serialize \Serializer \Json ;
1213use Magento \Framework \View \Element \Block \ArgumentInterface ;
@@ -41,13 +42,13 @@ class Breadcrumbs extends DataObject implements ArgumentInterface
4142 public function __construct (
4243 Data $ catalogData ,
4344 ScopeConfigInterface $ scopeConfig ,
44- Json $ json
45+ Json $ json = null
4546 ) {
4647 parent ::__construct ();
4748
4849 $ this ->catalogData = $ catalogData ;
4950 $ this ->scopeConfig = $ scopeConfig ;
50- $ this ->json = $ json ;
51+ $ this ->json = $ json ?: ObjectManager:: getInstance ()-> get (Json::class) ;
5152 }
5253
5354 /**
You can’t perform that action at this time.
0 commit comments