Skip to content

Commit

Permalink
fix: can't sort on undefined sdks (#8982)
Browse files Browse the repository at this point in the history
## About the changes
According to some logs, sdks can be undefined:
```
TypeError: Cannot read properties of null (reading 'sort')\n    at /unleash/node_modules/unleash-server/dist/lib/db/client-applications-store.js:330:22\n 
```
  • Loading branch information
gastonfournier authored Dec 16, 2024
1 parent 76dfa3c commit b1cced7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/db/client-applications-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export default class ClientApplicationsStore
return acc;
}, []);
environments.forEach((env) => {
env.sdks.sort();
env.sdks?.sort();
});

return {
Expand Down

0 comments on commit b1cced7

Please sign in to comment.