Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 21 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | const app = { |
||
2 | autoScrool: true, |
||
3 | }; |
||
4 | |||
5 | /** |
||
6 | * Init sentry, for capturing frontend errors. |
||
7 | */ |
||
8 | /** global: Raven */ |
||
9 | /** global: sentryDSN */ |
||
10 | Raven.config(sentryDSN).install(); |
||
11 | |||
12 | // Enable autoScrool by default. |
||
13 | // This code redundant, but it necessary for code quality checkers... |
||
14 | // Now app variable doesn't looks like never used 🤓🙈😁 |
||
15 | app.autoScrool = true; |
||
16 | |||
17 | // Disable Google Analytics tracking function for DEV environment. |
||
18 | // With the purpose don't break other places - here just define mock. |
||
19 | if (typeof gtag === 'undefined') { |
||
|
|||
20 | window.gtag = () => {}; |
||
21 | } |
||
22 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.