Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Replace 'false' event handlers with 'undefined' #26

Merged
merged 1 commit into from
Feb 3, 2018
Merged

Replace 'false' event handlers with 'undefined' #26

merged 1 commit into from
Feb 3, 2018

Conversation

apollocoder
Copy link
Contributor

It seems the browser doesn't appreciate "false" as an event handler. When i set the disabled prop to true I get the following error in the console:

Warning: Expected `onScroll` listener to be a function, instead got `false`.
If you used to conditionally omit it with onScroll={condition && value}, pass onScroll={condition ? value : undefined} instead.
    in div (created by styled.div)
    in styled.div (created by PullRefresh)
    in PullRefresh (at StandbyView.js:25)
    in StandbyView (created by DragDropContext(StandbyView))
    in DragDropContext(StandbyView) (created by Connect(DragDropContext(StandbyView)))
    in Connect(DragDropContext(StandbyView)) (at App.js:31)
    in div (at App.js:30)
    in div (at App.js:27)
    in div (at App.js:25)
    in MuiThemeProvider (created by MuiThemeProviderWrapper)
    in MuiThemeProviderWrapper (at App.js:24)
    in App (created by Connect(App))
    in Connect(App) (at index.js:22)
    in Provider (at index.js:21)

Fortunately the message already delivers the solution. I implemented the small changes in this pull request.

Thank you very much for your work!

Best Regards

@eugenkiss
Copy link

@YusukeShibata this also fixes #28.

@yusukeshib
Copy link
Owner

Thanks @apollocoder , checked and merged.

@yusukeshib yusukeshib merged commit 88ff691 into yusukeshib:master Feb 3, 2018
@apollocoder apollocoder deleted the hotfix/false_event_handlers branch February 6, 2018 10:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants