Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when compiling #207

Open
rodumv opened this issue Sep 22, 2017 · 1 comment
Open

Error when compiling #207

rodumv opened this issue Sep 22, 2017 · 1 comment

Comments

@rodumv
Copy link

rodumv commented Sep 22, 2017

Hi, Thanks for sharing this project!

I get the following error when compiling:

ERROR in ./shared/reducers/activations.js

Z:\GitHub\itsquiz-wall\shared\reducers\activations.js
31:13 error Do not use c-like loop with i++ or i +=1, instead use forEach, Map, or For of more/no-c-like-loops

✖ 1 problem (1 error, 0 warnings

I was able to fix it by replacing the loop statement (line 31) with:

  newActivations.foreach((value, i) => {
                if (action.offset + i < loadedActivations.length) {
                    loadedActivations[action.offset + i] = newActivations[i];
                } else {
                    loadedActivations.push(newActivations[i]);
                }
            });

rodumv added a commit to rodumv/itsquiz-wall that referenced this issue Sep 23, 2017
@sinepolskiy-ihor
Copy link

I can do it more lazy :)
in file shared/reducers/activations.js (line 31) replace
for (let i = 0; i < newActivations.length; i++) {
on
for (let i = 0; i < newActivations.length; i = i + 1) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants