Open tuyennn opened 1 month ago
While initial checkout as guest, exception throw-ed while address still be null in this scenario.
$(document, 'select[name="region_id"]').on('change', function() { let address = quote.shippingAddress(); rateReg.set(address.getKey(), null); rateReg.set(address.getCacheKey(), null); quote.shippingAddress(address); });
Propose change:
$(document, 'select[name="region_id"]').on('change', function() { let address = quote.shippingAddress(); if(!address) { return; } rateReg.set(address.getKey(), null); rateReg.set(address.getCacheKey(), null); quote.shippingAddress(address); });
While initial checkout as guest, exception throw-ed while address still be null in this scenario.
Propose change: