mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 18:38:29 -05:00
[guide] fix arrow IIFE call
Currently, it throws.
This commit is contained in:
committed by
Jordan Harband
parent
6e4859d7c6
commit
cb32f443c9
@@ -2546,10 +2546,10 @@ Other Style Guides
|
||||
}());
|
||||
|
||||
// good, but legacy (guards against the function becoming an argument when two files with IIFEs are concatenated)
|
||||
;(() => {
|
||||
;((() => {
|
||||
const name = 'Skywalker';
|
||||
return name;
|
||||
}());
|
||||
})());
|
||||
```
|
||||
|
||||
[Read more](https://stackoverflow.com/questions/7365172/semicolon-before-self-invoking-function/7365214%237365214).
|
||||
|
||||
Reference in New Issue
Block a user