File tree 1 file changed +7
-9
lines changed
app/code/Magento/Bundle/view/base/web/js
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -374,16 +374,14 @@ define([
374
374
function applyTierPrice ( oneItemPrice , qty , optionConfig ) {
375
375
var tiers = optionConfig . tierPrice ,
376
376
magicKey = _ . keys ( oneItemPrice ) [ 0 ] ,
377
+ tiersFirstKey = _ . keys ( optionConfig ) [ 0 ] ,
377
378
lowest = false ;
378
-
379
- //tiers is undefined when options has only one option
380
- if ( undefined == tiers ) {
381
- var firstKey = Object . keys ( optionConfig ) [ 0 ] ;
382
- tiers = optionConfig [ firstKey ] . tierPrice ;
383
- }
384
-
385
- //sorting based on "price_qty"
386
- tiers . sort ( function ( a , b ) {
379
+
380
+ if ( undefined === tiers ) { //tiers is undefined when options has only one option
381
+ tiers = optionConfig [ tiersFirstKey ] . tierPrice ;
382
+ }
383
+
384
+ tiers . sort ( function ( a , b ) { //sorting based on "price_qty"
387
385
return a [ 'price_qty' ] - b [ 'price_qty' ] ;
388
386
} ) ;
389
387
You can’t perform that action at this time.
0 commit comments