assets/javascripts/materialize/component.js in materialize-sass-1.0.0.alpha3 vs assets/javascripts/materialize/component.js in materialize-sass-1.0.0.alpha4
- old
+ new
@@ -39,10 +39,10 @@
key: 'init',
value: function init(classDef, els, options) {
var instances = null;
if (els instanceof Element) {
instances = new classDef(els, options);
- } else if (!!els.jquery || els instanceof NodeList) {
+ } else if (!!els && (els.jquery || els.cash || els instanceof NodeList)) {
var instancesArr = [];
for (var i = 0; i < els.length; i++) {
instancesArr.push(new classDef(els[i], options));
}
instances = instancesArr;