File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,10 @@ public function getCustomFieldsAttribute()
110
110
if ( class_exists ($ class = $ this ->owner_type ) ){
111
111
$ customFields = [];
112
112
foreach ($ this ->getCustomFields ($ class ) as $ field => $ message ){
113
- // Custom message
114
- $ customMessage = $ this ->resolveCustomMessage (
115
- array_get ($ message , $ this ->type , $ message )
116
- );
117
-
118
- // Check if message was custom
119
- if ($ customMessage ){
120
- $ customFields [$ field ] = $ customMessage ;
113
+ if (is_array ($ message ) && isset ($ message [$ this ->type ])){
114
+ $ customFields [$ field ] = $ this ->resolveCustomMessage ($ message [$ this ->type ]);
115
+ } elseif (is_string ($ message )) {
116
+ $ customFields [$ field ] = $ this ->resolveCustomMessage ($ message );
121
117
}
122
118
}
123
119
You can’t perform that action at this time.
0 commit comments