From 392bfbf616694692535763df8317dab2a9e61a51 Mon Sep 17 00:00:00 2001 From: Tim Dohmen Date: Thu, 30 Jul 2020 13:22:09 +0200 Subject: [PATCH] Fixed error when not on carrier selection page --- wuunderconnector/views/js/hook/checkoutjavascript1.6.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wuunderconnector/views/js/hook/checkoutjavascript1.6.js b/wuunderconnector/views/js/hook/checkoutjavascript1.6.js index c4a21e9..b06a0d2 100644 --- a/wuunderconnector/views/js/hook/checkoutjavascript1.6.js +++ b/wuunderconnector/views/js/hook/checkoutjavascript1.6.js @@ -21,7 +21,9 @@ $(window).on("load", function() { // Get the modal var selectParcelshopLink = '
' + innerHtml + '
'; var parcelshopShippingMethodElemRadio = jQuery('[value="' + shippingCarrierId + ',"].delivery_option_radio'); - var parcelshopDescriptionElem = jQuery('[value="' + shippingCarrierId + ',"].delivery_option_radio').parents()[3].children[2]; + if (parcelshopShippingMethodElemRadio.length > 0){ + var parcelshopDescriptionElem = jQuery('[value="' + shippingCarrierId + ',"].delivery_option_radio').parents()[3].children[2]; + } var shippingMethodElems = jQuery('input.delivery_option_radio'); var shippingAddress; var getAddressUrl = "index.php?fc=module&module=wuunderconnector&controller=parcelshop&getAddress=1";