Skip to content

Commit

Permalink
Merge pull request #1782 from SUI-Components/feature/avoid-optimistic…
Browse files Browse the repository at this point in the history
…-access

feat(packages/eslint-plugin-sui): prevent optimistic access
  • Loading branch information
AgonisticKatai authored Jun 25, 2024
2 parents 934e2ec + e6a8b2d commit b2c87be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-plugin-sui/src/rules/factory-pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module.exports = {

if (isUseCase) {
const hasExportedFactoryVariable = Boolean(
node.parent.body.find(
node?.parent?.body?.find(
body =>
body?.type === 'ExportNamedDeclaration' &&
body?.declaration?.type === 'VariableDeclaration' &&
Expand Down

0 comments on commit b2c87be

Please sign in to comment.