Update billing address in checkout page dropdown address
-
15-04-2021 - |
Pergunta
When update the billing address in magento2 checkout payment page. getting below JS error.
replicate for select the dropdown address and click on the update button. getting below JS error
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)<I.length){H.push(I.slice(D,D+G))}return H.collect(F,E)}, function d(F,E){F=F||Prototype.K;var D=true;this.each(function(H,G){D=D&&!!F.call(E,H,G);if(!D){throw $break}});return D}, function o(F,E){F=F||Prototype.K;var D=false;this.each(function(H,G){if(D=!!F.call(E,H,G)){throw $break}});return D}, function p(F,E){F=F||Prototype.K;var D=[];this.each(function(H,G){D.push(F.call(E,H,G))});return D}, function A(F,E){var D;this.each(function(H,G){if(F.call(E,H,G)){D=H;throw $break}});return D}, function n(F,E){var D=[];this.each(function(H,G){if(F.call(E,H,G)){D.push(H)}});return D}, function n(F,E){var D=[];this.each(function(H,G){if(F.call(E,H,G)){D.push(H)}});return D}, function l(G,F,E){F=F||Prototype.K;var D=[];if(Object.isString(G)){G=new RegExp(RegExp.escape(G))}this.each(function(I,H){if(G.match(I)){D.push(F.call(E,I,H))}});return D}, function b(D){if(Object.isFunction(this.indexOf)){if(this.indexOf(D)!=-1){return true}}var E=false;this.each(function(F){if(F==D){E=true;throw $break}});return E}, function b(D){if(Object.isFunction(this.indexOf)){if(this.indexOf(D)!=-1){return true}}var E=false;this.each(function(F){if(F==D){E=true;throw $break}});return E}, function w(E,D){D=Object.isUndefined(D)?null:D;return this.eachSlice(E,function(F){while(F.length<E){F.push(D)}return F})}, function r(D,F,E){this.each(function(H,G){D=F.call(E,D,H,G)});return D}, function C(E){var D=$A(arguments).slice(1);return this.map(function(F){return F[E].apply(F,D)})}, function g(G,E){G=G||Prototype.K;var F=[],D=[];this.each(function(I,H){(G.call(E,I,H)?F:D).push(I)});return[F,D]}, function h(E){var D=[];this.each(function(F){D.push(F[E])});return D}, function f(F,E){var D=[];this.each(function(H,G){if(!F.call(E,H,G)){D.push(H)}});return D}, function s(E,D){return this.map(function(G,F){return{value:G,criteria:E.call(D,G,F)}}).sort(function(I,H){var G=I.criteria,F=H.criteria;return G<F?-1: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)}
Solução
Remove _.values for currentBillingAddress().street in
in the file vendor/magento/module-checkout/view/frontend/web/template/billing-address/details.html
use this in the file currentBillingAddress().street
Change this file by copying the file into the app folder with the same path. This worked for me.
Outras dicas
hello great to see someone with the same issue find a solution good work. I am by no means a coder this is my snippet
Before
args="_.values(currentBillingAddress().street).join(', ')"/>
After
args="(currentBillingAddress().street).join(', ')"/>
is this right because i dont really see any change. do I need to run upgrade command?