Change the way we detect that an object of key/value pairs has been passed to Element#store.

This commit is contained in:
savetheclocktower 2008-12-16 13:19:23 -06:00
parent 0549952094
commit bd1d3fa1ff

View File

@ -1240,11 +1240,11 @@ Element.addMethods({
store: function(element, key, value) {
if (!(element = $(element))) return;
if (Object.isString(key)) {
element.getStorage().set(key, value);
} else {
if (arguments.length === 2) {
// Assume we've been passed an object full of key/value pairs.
element.getStorage().update(key);
} else {
element.getStorage().set(key, value);
}
return element;