Avoid unnecessary code blocks

Impact area

Manageability

Severity

Medium

Affected element

Lightning

Rule ID

SF-0065

Impact

Empty code blocks are often used in other languages to introduce a new variable scope. Blocks do not behave like this in JavaScript, and using them can be misleading.

Remediation

Consider removing this unnecessary block.

Time to fix

30 min




Last modified on Dec 23, 2022