Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
add a check to make sure the source id is defined before setting
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Jun 13, 2023
1 parent bb476bb commit dbaee51
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ function Debugger(): JSX.Element {
session.selectors.stacktrace.current.report
)[0].address;
// when the contract is "unknown", the source id will be the address
setCurrentSourceId(currentContractAddress);
// we need this if check so that no loop occurs when the value is falsy
if (currentContractAddress) {
setCurrentSourceId(currentContractAddress);
}
}
currentStep = session.view(session.selectors.trace.index);
}
Expand Down

0 comments on commit dbaee51

Please sign in to comment.