Commit ca1bf71
authored
replace empty() check
when searching for an address that returns no result, an AddressCollection item is returned with no locations inside, which means locations is an empty array, so the next line which reads the first result will cause an exception when there is no location. it is better to use the isEmpty() method of the AddressCollection to no try to access the first entry when there is no such entry1 parent f6a4796 commit ca1bf71
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments