Skip to content

Checkout. Quote Address Street cloning issue #26276

Closed
@yutv

Description

@yutv

Preconditions (*)

  1. Magento 2.3.3 or 2.4-develop
  2. Logged in Customer with an Address marked both as Shipping and as Billing.

Steps to reproduce (*)

  1. Add a product to cart and go to the second step of checkout.

  2. Open developer console and change billing address. e.g.

     require('Magento_Checkout/js/model/quote').billingAddress().street[0] = '123 Main Street'
    

Expected result (*)

  1. Shipping Address remains the same

Actual result (*)

  1. Shipping address street is changed to "123 Main Street"

image

Cloning Issue

The issue is here app/code/Magento/Checkout/view/frontend/web/js/action/select-billing-address.js#L21

and can be fixed by replacing:

address = $.extend({}, billingAddress);

to

address = $.extend(true, {}, billingAddress);

to clone address recursively including the street array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReported on 2.3.3Indicates original Magento version for the Issue report.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions