1

when I hit update the billing address during checkout I get this string from legacy-build.min.js inserted into the address:

function e(F,E){var D=0;try{this._each(function(H){F.call(E,H,D++)})}catch(G){if(G!=$break){throw G}}return this}, function y(G,F,E){var D=-G,H=[],I=this.toArray();if(G<1){return I}while((D+=G)F?1:0}).pluck("value")}, function w(){return s.call(this,0)}, function z(){var E=Prototype.K,D=$A(arguments);if(Object.isFunction(D.last())){E=D.pop()}var F=[this].concat(D).map($A);return this.map(function(H,G){return E(F.pluck(G))})}, function p(){return this.length}, function z(){return"["+this.map(Object.inspect).join(", ")+"]"}, function reverse() { [native code] }, function forEach() { [native code] }, function r(){this.length=0;return this}, function f(){return this[0]}, function l(){return this[this.length-1]}, function o(){return this.select(function(B){return B!=null})}, function A(){return this.inject([],function(C,B){if(Object.isArray(B)){return C.concat(B.flatten())}C.push(B);return C})}, function n(){var B=s.call(arguments,0);return this.select(function(C){return !B.include(C)})}, function q(B){return this.inject([],function(E,D,C){if(0==C||(B?E.last()!=D:!E.include(D))){E.push(D)}return E})}, function v(B){return this.uniq().findAll(function(C){return B.detect(function(D){return C===D})})}, function w(){return s.call(this,0)}

Anyone has any idea how to fix this?

Thanks

6

Remove _.values for currentBillingAddress().street in <text args="_.values(currentBillingAddress().street).join(', ')"/><br/> in the file vendor/magento/module-checkout/view/frontend/web/template/billing-address/details.html

Change this file by copying the file into the app folder with the same path. This worked for me.

0

Weird bug, i also found this and fix it like:

In files:

vendor/magento/module-checkout/view/frontend/web/template/billing-address/details.html

and

vendor/magento/module-checkout-address-search/view/frontend/web/template/billing-address/details.html

replace

_.values(currentBillingAddress().street).join(', ')

BY

_.values(currentBillingAddress().street).slice(0,3).join(', ')

this is a hackish workaround - this bug is due to Object values to array conversion and it seems earlier browser versions were only picking values inside currentBillingAddress() Object , but now in case of issue it seems lodash.values is also adding prototype objects of an object as items in array, check Lodash version and see if you can fallback/upgrade to different one.

Regards Deep Kamal Singh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.