Skip to content

Commit

Permalink
Merge pull request equinor#1797 from janburak/WE-870
Browse files Browse the repository at this point in the history
WE-870 fix crash on null server url
  • Loading branch information
janburak committed Mar 17, 2023
2 parents b28d910 + 569b0f8 commit 2b549bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Src/WitsmlExplorer.Frontend/components/Routing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ const Routing = (): React.ReactElement => {
// update selected server when servers are fetched
if (isSyncingUrlAndState && urlParams) {
const serverUrl = urlParams.serverUrl;
if (serverUrl == null) {
return;
}
const server = servers.find((server: Server) => server.url.toLowerCase() === serverUrl.toLowerCase());
if (server && !selectedServer) {
if (hasSelectedServer) {
Expand Down

0 comments on commit 2b549bd

Please sign in to comment.