Closed sprankhub closed 4 years ago
internal ref: DHLGW-946
@sprankhub Thanks for your contribution, we will evaluate and test the changes internally and get back to you.
Thanks @ngolatka! Just for our planning... What is the expected time frame for that?
I just tested this and can confirm that it works as expected.
Thank you for your contribution, much appreciated!
Some (indirectly related) background information for those who may wonder "why does the above problem occur when DHL Shipping is not even enabled for checkout"?
The answer, thankfully provided by @mam08ixo
Due to the carrier-agnostic nature of the core/ui packages, the JS code will always run. If DHL Paket is disabled for checkout, the frontend code will still check if there is any other carrier to offer checkout services. If for instance only "Flatrate" is enabled, the code will find out that there is nothing to display and carry on. But it will perform the check, hence the code in question was and will remain executed.
This PR replaces
Array.find
with_.find
.Array.find
is not supported by old browsers like IE. You already use_.find
at various other places, so replacing these two problematic occurrences ofArray.find
with_.find
is the right way to fix this IMHO.Even though this is a tiny change, please mind that it is currently untested.