Skip to content

Commit

Permalink
feat(packages/eslint-plugin-sui): prevent optimistic access
Browse files Browse the repository at this point in the history
  • Loading branch information
Nacho Torrella committed Jun 25, 2024
1 parent 934e2ec commit e6a8b2d
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 e6a8b2d

Please sign in to comment.