@gisce/react-ooui 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",
@@ -159,6 +159,13 @@ function sortResults({
159
159
  }
160
160
 
161
161
  function sortResultsWithOrder(results: any[], order: number[]) {
162
+ if (!order) {
163
+ const sortResultsById = results.sort((a: any, b: any) => {
164
+ return a.id - b.id;
165
+ });
166
+ return sortResultsById;
167
+ }
168
+
162
169
  const sortedResults = results.sort((a: any, b: any) => {
163
170
  const aIndex = order.indexOf(a.id);
164
171
  const bIndex = order.indexOf(b.id);