File tree 1 file changed +3
-2
lines changed
app/code/Magento/Catalog/ViewModel/Product
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Catalog \Helper \Data ;
9
9
use Magento \Framework \App \Config \ScopeConfigInterface ;
10
+ use Magento \Framework \App \ObjectManager ;
10
11
use Magento \Framework \DataObject ;
11
12
use Magento \Framework \Serialize \Serializer \Json ;
12
13
use Magento \Framework \View \Element \Block \ArgumentInterface ;
@@ -41,13 +42,13 @@ class Breadcrumbs extends DataObject implements ArgumentInterface
41
42
public function __construct (
42
43
Data $ catalogData ,
43
44
ScopeConfigInterface $ scopeConfig ,
44
- Json $ json
45
+ Json $ json = null
45
46
) {
46
47
parent ::__construct ();
47
48
48
49
$ this ->catalogData = $ catalogData ;
49
50
$ this ->scopeConfig = $ scopeConfig ;
50
- $ this ->json = $ json ;
51
+ $ this ->json = $ json ?: ObjectManager:: getInstance ()-> get (Json::class) ;
51
52
}
52
53
53
54
/**
You can’t perform that action at this time.
0 commit comments