Skip to content

Conversation

@evenstensberg
Copy link

Added local scoping from ES6 syntax with const to static variables. Also added error log to getState function to notify if the user decides to do something tricky.

evenstensberg added 3 commits April 3, 2016 08:34
Added let to for loop scopes and an additional error log if user
decides to do something tricky
Fixed awkward typo mistake
}


if (typeof getState !== 'function' || getState == 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getState is a locally defined function. It is guaranteed to be a function by the code unless I’m missing something.

@gaearon
Copy link
Contributor

gaearon commented Apr 4, 2016

I’m up for replacing var with const or let but we should do it consistently across the codebase, not just in a few methods. This is already being done in #1559 so I’ll close this out. Thanks for the PR!

@gaearon gaearon closed this Apr 4, 2016
@evenstensberg
Copy link
Author

Yeah, did that at first, but considering some variables were used across scopes, I left them as variables, but Mateusz covers this smoothly!

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

Successfully merging this pull request may close these issues.

2 participants