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

$scroll produces promise error #159

Closed
basepack opened this issue Oct 20, 2021 · 2 comments
Closed

$scroll produces promise error #159

basepack opened this issue Oct 20, 2021 · 2 comments

Comments

@basepack
Copy link
Contributor

While using the following setup:

<div wire:click="setBankType({{ $bankType }})"
     x-data x-on:click="$scroll('#scrolltopaymentbutton')">Bank 1</div>
<div wire:click="setBankType({{ $bankType }})"
     x-data x-on:click="$scroll('#scrolltopaymentbutton')">Bank 2</div>

<div id="scrolltopaymentbutton">Pay now</div>

I got the following error: Uncaught (in promise) TypeError: Cannot convert undefined or null to object

Full error:
image

Referenced line:
image

@basepack
Copy link
Contributor Author

Well scratch that, the button was hidden 🤣

@SimoTod
Copy link
Collaborator

SimoTod commented Oct 20, 2021

We should probably add a better error mesage anyway. Thanks for pointing that out

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