Skip to content

Commit

Permalink
Webhook project setttings fix (#1265)
Browse files Browse the repository at this point in the history
Ternary operator fix

altered the ternary operator to account for cases where websocket is empty.
  • Loading branch information
sneakzttv authored Jan 9, 2025
1 parent de935be commit faf1164
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ public void OnGUI()
selectedWebHookIndex =
Mathf.Clamp(selectedWebHookIndex, 0, window.chainList[selectedChainIndex].rpc.Count - 1);
var webhookIndex = window.chainList[selectedChainIndex].rpc.IndexOf(chainConfig.Ws);
var selectedWebHook =
webhookIndex == -1 ? window.chainList[selectedChainIndex].rpc[selectedWebHookIndex] : chainConfig.Ws;
var selectedWebHook = (webhookIndex == -1 || string.IsNullOrEmpty(chainConfig.Ws))
? window.chainList[selectedChainIndex].rpc[selectedWebHookIndex]
: chainConfig.Ws;
if (GUILayout.Button(selectedWebHook, EditorStyles.popup))
{
searchProvider = CreateInstance<StringListSearchProvider>();
Expand Down

0 comments on commit faf1164

Please sign in to comment.