File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,14 @@ public function getConditions(): array
173
173
public function getJsonData (): array
174
174
{
175
175
$ data = [
176
- 'action ' => $ this ->action ,
177
- 'options ' => $ this ->options ->getAll (),
176
+ 'action ' => $ this ->action
178
177
];
179
178
179
+ $ options = $ this ->options ->getAll ();
180
+ if (!empty ($ options )) {
181
+ $ data ['options ' ] = $ options ;
182
+ }
183
+
180
184
$ conditions = $ this ->getConditionJsonData ();
181
185
if (!empty ($ conditions )) {
182
186
$ data ['conditions ' ] = $ conditions ;
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public function testEmptyOptions(): void
100
100
$ action = new Action ('\\Foo \\Bar ' );
101
101
$ config = $ action ->getJsonData ();
102
102
103
- $ this ->assertCount (0 , $ config[ ' options ' ] );
103
+ $ this ->assertCount (1 , $ config );
104
104
}
105
105
106
106
/**
You can’t perform that action at this time.
0 commit comments