diff options
author | Mark Stacey <markjstacey@gmail.com> | 2019-07-06 01:01:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-06 01:01:34 +0800 |
commit | 95f198550e419c598750a1717014dac6ca5091e9 (patch) | |
tree | 50720fa452bf11b9f0ec720f84f70bd2231d38d2 /test/unit/ui/app | |
parent | 0311f2d28c60fb82141dee471c19ad085930f8cc (diff) | |
download | tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.tar tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.tar.gz tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.tar.bz2 tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.tar.lz tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.tar.xz tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.tar.zst tangerine-wallet-browser-95f198550e419c598750a1717014dac6ca5091e9.zip |
Declare variables before use (#6806)
While working on #6805, I noticed that many variables were being used
before they were declared. Technically this worked fine in practice
because we were using the `transform-es2015-block-scoping` Babel plugin,
which transforms `let` and `const` to `var`, which is hoisted. However,
after removing that Babel transformation, many things broke.
All instances of variables or classes being used before declared have
been fixed.
The `no-use-before-define` eslint rule has been added to catch these
cases going forward. The rule is disabled for function declarations for
the moment, because those are always hoisted. We could disable that too
if we want to, but it's purely stylistic and would require a lot more
changes.
Diffstat (limited to 'test/unit/ui/app')
-rw-r--r-- | test/unit/ui/app/reducers/app.spec.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/ui/app/reducers/app.spec.js b/test/unit/ui/app/reducers/app.spec.js index 09cf3dbf0..28f5ebb33 100644 --- a/test/unit/ui/app/reducers/app.spec.js +++ b/test/unit/ui/app/reducers/app.spec.js @@ -700,7 +700,7 @@ describe('App State', () => { }) it('hides sub loading indicator', () => { - const oldState = {...metamaskState, ...oldState} + const oldState = {...metamaskState, isSubLoading: true } const state = reduceApp(oldState, { type: actions.HIDE_SUB_LOADING_INDICATION, }) |