digicorp / propeller

Propeller - Develop more, Code less. Propeller is a front-end responsive framework based on Google's Material Design Standards & Bootstrap.
http://propeller.in
MIT License
1.13k stars 139 forks source link

Error for later loading page. [v1.3.1] #84

Closed ljx213101212 closed 6 years ago

ljx213101212 commented 6 years ago

Issue: 9b5f2c54

Problem location: Propeller.js 1.3.1 line.18

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

Can you please also check parentSelector !== null ? Because in some case for example: When a button click trigger another part of "js generated html" or ".Net Partial View generated html" attach to current page. In this case parentSelector becomes null. The error information was shown in the picture I attached.

Can you please fix this issue with sample logic as below: if (parentSelector != null && parentSelector !== '' && parentSelector.length > 0) {

Thank you very much!

sunil-digicorp commented 6 years ago

Thank you for pointing this out and also providing a solution. It works now.