@@ -647,17 +647,16 @@ <h2>
647
647
exceptions.
648
648
</ li >
649
649
< li > If < var > seenIDs</ var > contains
650
- < var > option</ var > .< a > id</ a > , then set < var > options</ var >
651
- to an empty sequence and break.
650
+ < var > option</ var > .< a > id</ a > , then throw a
651
+ < a > TypeError</ a > . Optionally, inform the developer that
652
+ shipping option IDs must be unique.
652
653
</ li >
653
- < li > Append < var > option</ var > .< a > id</ a > to
654
+ < li > Otherwise, append < var > option</ var > .< a > id</ a > to
654
655
< var > seenIDs</ var > .
655
656
</ li >
656
657
</ ol >
657
658
</ li >
658
- < li > For each < var > option</ var > in < var > options</ var > (which
659
- may have been reset to the empty sequence in the previous
660
- step):
659
+ < li > For each < var > option</ var > in < var > options</ var > :
661
660
< ol >
662
661
< li > If < var > option</ var > .< a > selected</ a > is true, then
663
662
set < var > selectedShippingOption</ var > to
@@ -1512,11 +1511,6 @@ <h2>
1512
1511
< dd >
1513
1512
A sequence containing the different shipping options for the user
1514
1513
to choose from.
1515
- < p >
1516
- If the sequence is empty, then this indicates that the merchant
1517
- cannot ship to the current < a data-lt =
1518
- "PaymentRequest.shippingAddress "> shippingAddress</ a > .
1519
- </ p >
1520
1514
< p >
1521
1515
If an item in the sequence has the < a data-lt =
1522
1516
"PaymentShippingOption.selected "> selected</ a > member set to true,
@@ -2555,20 +2549,21 @@ <h2>
2555
2549
exception is thrown, then < a > abort the update</ a >
2556
2550
with that exception.
2557
2551
</ li >
2558
- < li > If < var > seenIDs</ var > contains
2552
+ < li data-tests =
2553
+ "PaymentRequestUpdateEvent/updateWith-duplicate-shipping-options-manual.https.html ">
2554
+ If < var > seenIDs</ var > contains
2559
2555
< var > option</ var > .< a data-lt =
2560
- "PaymentShippingOption.id "> id</ a > , then set
2561
- < var > options </ var > to an empty sequence and break .
2556
+ "PaymentShippingOption.id "> id</ a > , then < a > abort
2557
+ the update </ a > with a < a > TypeError </ a > .
2562
2558
</ li >
2563
- < li > Append < var > option </ var > . < a data-lt =
2564
- "PaymentShippingOption.id "> id</ a > to
2565
- < var > seenIDs</ var > .
2559
+ < li > Otherwise, append
2560
+ < var > option </ var > . < a data-lt = "PaymentShippingOption.id "> id</ a >
2561
+ to < var > seenIDs</ var > .
2566
2562
</ li >
2567
2563
</ ol >
2568
2564
</ li >
2569
2565
< li > For each < var > option</ var > in
2570
- < var > shippingOptions</ var > (which may have been reset
2571
- to the empty sequence in the previous step):
2566
+ < var > shippingOptions</ var > :
2572
2567
< ol >
2573
2568
< li > If < var > option</ var > .< a data-lt =
2574
2569
"PaymentShippingOption.selected "> selected</ a > is
0 commit comments