From bd1d3fa1ffe8cb3139ff70a941ea528091c9fa81 Mon Sep 17 00:00:00 2001 From: savetheclocktower Date: Tue, 16 Dec 2008 13:19:23 -0600 Subject: [PATCH] Change the way we detect that an object of key/value pairs has been passed to Element#store. --- src/dom/dom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index fd5a186..1c52917 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -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;