Skip to content

Commit 850342f

Browse files
committed
Update src/data.js to allow the storing of functions as data. This is consistent with the JQuery documentation.
1 parent ef08167 commit 850342f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/data.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
return value === undefined ?
2727
this.length == 0 ? undefined : getData(this[0], name) :
2828
this.each(function(idx){
29-
setData(this, name, $.isFunction(value) ?
30-
value.call(this, idx, getData(this, name)) : value)
31-
})
32-
}
29+
setData(this, name, value);
30+
});
31+
};
3332
})(Zepto)

0 commit comments

Comments
 (0)