unclead / yii2-multiple-input

Yii2 widget for handle multiple inputs for an attribute of model
https://unclead.github.io/yii2-multiple-input/
BSD 3-Clause "New" or "Revised" License
393 stars 127 forks source link

prevent error loop in case of undefined `$wrapper.data('multipleInput')` #362

Closed cebe closed 3 years ago

cebe commented 3 years ago

if for any reason this code line fails, the interval is not removed and console.log fills with error messages every 10ms.

This change prevents that from happening.

I have no idea why it fails, but the widget works fine after it.

cebe commented 3 years ago

there is also an undefined variable rowsCount here:

https://github.com/unclead/yii2-multiple-input/blob/651f07c875494bba82cf6e1589ed43fff1fdb267/src/assets/src/js/jquery.multipleInput.js#L415

cebe commented 3 years ago

Thanks for the quick merge! Would you mind to add "hacktoberfest" topic to the repo, so contributions count for hacktoberfest?

unclead commented 3 years ago

@cebe sure. done 😄