Skip to content

Commit 3348b43

Browse files
committed
Improve isEmpty conditional
1 parent 5086a11 commit 3348b43

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/DataFrame-IO/DataFrameJsonReader.class.st

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,10 @@ DataFrameJsonReader >> parseFromValues: anArrayOfArrays [
182182
{ #category : #reading }
183183
DataFrameJsonReader >> read: json [
184184
"Loads parsed json"
185-
186-
json isEmpty
187-
ifTrue: [ rows := #() ]
188-
ifFalse: [
189-
orient = 'auto' ifTrue: [ self inferOrientFromJson: json ].
190-
(parseMap at: orient) value: json.
191-
].
185+
186+
json ifEmpty: [ rows := #( ) ] ifNotEmpty: [
187+
orient = 'auto' ifTrue: [ self inferOrientFromJson: json ].
188+
(parseMap at: orient) value: json ]
192189
]
193190

194191
{ #category : #reading }

0 commit comments

Comments
 (0)