Skip to content
This repository was archived by the owner on Aug 27, 2018. It is now read-only.

Fix assignment to undeclared variable in state#283

Open
blowery wants to merge 1 commit intomasterfrom
fix/busted-ref-in-state
Open

Fix assignment to undeclared variable in state#283
blowery wants to merge 1 commit intomasterfrom
fix/busted-ref-in-state

Conversation

@blowery
Copy link

@blowery blowery commented Jun 22, 2018

Noticed this when trying to compile calypso with some more modern babel presets. Once "use strict" is added to the file, this throws.

const create = customEnhancer ? customEnhancer(middle) : middle;

store = create(reducer, reducer(undefined, { type: '@@INIT' }));
const store = create(reducer, reducer(undefined, { type: '@@INIT' }));
Copy link
Member

Choose a reason for hiding this comment

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

brought in in https://github.com/Automattic/notifications-panel/pull/108/files#diff-1dabc0c5cbcbadc986b3d7e221b63734

maybe it would be more in the spirit of the original code change to just return create( … ). I don't see any need for the store to have its own binding.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants