PrestaShop/PrestaShop — pull request #879 by neemzy (2013-10-24 07:44:29+00:00)
Title: Conditions to hide VAT fields fail if there are no company fields

"Company" fields may or may not be rendered on this form, whereas "VAT" fields are always rendered and depend on the former ones to be shown (or hidden) with CSS.

This fixes an edge case where there are no "Company" fields rendered and "VAT" fields still wrongly appear, which was caused by the fact that `$('#field').val() != ''` is truthy when `$('#field').length` is zero (since `'' != undefined`).