提交 f4e700c1 编写于 作者: C Catouse

* fixed errors in store.js.

上级 d6148997
......@@ -59,13 +59,13 @@
Store.prototype.pageGet = function(key, defaultValue)
{
var val = this.page[key];
return (defaultValue !== undefined && val === null) ? defaultValue : val;
return (defaultValue !== undefined && (val === null || val === undefined)) ? defaultValue : val;
};
/* Set page data */
Store.prototype.pageSet = function(objOrKey, val)
{
if($.isPlanObject(objOrKey))
if($.isPlainObject(objOrKey))
{
$.extend(true, this.page, objOrKey);
}
......@@ -118,7 +118,7 @@
Store.prototype.get = function(key, defaultValue)
{
var val = this.deserialize(this.getItem(key));
return (defaultValue !== undefined && val === null) ? defaultValue : val;
return (defaultValue !== undefined && (val === null || val === undefined)) ? defaultValue : val;
};
/* Get item key by index and deserialize it */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册