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

emailComponent. call().hasRendered is not a function #1232

Open
alex-james opened this issue Feb 14, 2024 · 0 comments
Open

emailComponent. call().hasRendered is not a function #1232

alex-james opened this issue Feb 14, 2024 · 0 comments

Comments

@alex-james
Copy link

I'm running Magento 2.4.6-p4 Open Source with the Amazon module 5.16.1,

After logging in to Amazon / confirming existing login and returning to the checkout Delivery step I see the following in the console log:

Uncaught TypeError: emailComponent. call...).hasRendered is not a function at UiClass. setEmail (checkout-address,is:105:43) at checkout-addressis:72:26 at handleResponse (checkout-session address-load,15:35;13) at Object. validateAndHandle (checkout-session=address-load, j.s:43;13) at fire (iguery. js:3500:50) at Object. firewith [as resolvewith] (jguery js:3630:29) at done (iquery. is:9796:30) at XMLHt tpRequest. <anonymous> (iguery.is: 10057:37)

Looking at the code it relates to changes in view/frontend/web/js/view/checkout-address.js to the setEmail() function which has changed (at least since v5.10.0) to include calls to:

emailComponent.call().hasRendered()

the view/frontend/web/js/view/form/element/email.js script referenced by emailComponent does not include a call() or hasRendered() method.

I'm also struggling to understand the reason for the setEmail() function as the email field is surely a KO component with a callback in view/frontend/web/js/view/form/element/email.js as emailHasChanged() which handles changes and seems to server the same purpose as setEmail() by calling:

checkoutData.setValidatedEmailValue() and checkoutData.setInputFieldEmailValue(

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

1 participant