digicorp/propeller

parentSelector variable with 'undefined' failed to check

jewijaya opened this issue · 2 comments

I found a problem when trying using propeller with jquery 3.2.1 & 3.3.1
maybe is not about jquery version, because i check with jquery 1.12.4 is working

image

The problem seems from propeller.js in commons.attachParentSelector function.
It seem failed while trying to evaluate parentSelector which has undefined value

My simple fix is, just added some new conditionals while evaluate parentSelector value

if (parentSelector && parentSelector !== '' && parentSelector.length > 0)

This 'parentSelector' conditional will guarantee that parentSelector for this value

  • null
  • undefined
  • NaN
  • empty string ("")
  • 0
  • false

https://stackoverflow.com/questions/5515310/is-there-a-standard-function-to-check-for-null-undefined-or-blank-variables-in

@jewijaya Thank you for bringing it to our notice. We will check it and make the necessary changes.

xeboo commented

Thx, that works