Skip to content

Commit 5c66348

Browse files
committed
Refactor order
1 parent 35b4661 commit 5c66348

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/hardhat-chai-matchers/src/internal/addressable.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ function override(
2828
// otherwise undefined is returned.
2929
function tryGetAddressSync(value: any): string | undefined {
3030
value = tryDereference(value, "address");
31+
if(isAddressable(value)) {
32+
value = (value as any).address ?? (value as any).target;
33+
}
3134
if (isAddress(value)) {
3235
return value;
33-
} else if (isAddressable(value)) {
34-
return tryGetAddressSync((value as any).address ?? (value as any).target);
3536
} else {
3637
return undefined;
3738
}

0 commit comments

Comments
 (0)