diff --git a/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstrap.js b/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstrap.js index 0541d9153..ef51b32d5 100644 --- a/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstrap.js +++ b/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstrap.js @@ -162,12 +162,16 @@ class SingleProductBootstrap { }, ] .map( ( f ) => f() ) - .sort((a, b) => { - if (parseInt(a.replace(/\D/g, '')) < parseInt(b.replace(/\D/g, '')) ) { - return 1; - } - return -1; - }) + .filter( ( val ) => val !== null && val !== undefined ) + .sort( ( a, b ) => { + if ( + parseInt( a.replace( /\D/g, '' ) ) < + parseInt( b.replace( /\D/g, '' ) ) + ) { + return 1; + } + return -1; + } ) .find( ( val ) => val ); if ( typeof priceText === 'undefined' ) {