Skip to content

Commit 3187148

Browse files
fix: add braces to one-line if statements in ERC721EnumerableFacet
Fix style guide violation by adding braces around one-line if statements that call revert. This ensures compliance with Compose's coding standards which require all if statements to use braces. Fixes two instances in safeTransferFrom functions (lines 331 and 354).
1 parent 1cd4cbf commit 3187148

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/token/ERC721/ERC721Enumerable/ERC721EnumerableFacet.sol

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,9 @@ contract ERC721EnumerableFacet {
328328
revert ERC721InvalidReceiver(_to);
329329
}
330330
} catch (bytes memory reason) {
331-
if (reason.length == 0) revert ERC721InvalidReceiver(_to);
331+
if (reason.length == 0) {
332+
revert ERC721InvalidReceiver(_to);
333+
}
332334
assembly ("memory-safe") {
333335
revert(add(reason, 0x20), mload(reason))
334336
}
@@ -351,7 +353,9 @@ contract ERC721EnumerableFacet {
351353
revert ERC721InvalidReceiver(_to);
352354
}
353355
} catch (bytes memory reason) {
354-
if (reason.length == 0) revert ERC721InvalidReceiver(_to);
356+
if (reason.length == 0) {
357+
revert ERC721InvalidReceiver(_to);
358+
}
355359
assembly ("memory-safe") {
356360
revert(add(reason, 0x20), mload(reason))
357361
}

0 commit comments

Comments
 (0)