naver / egjs

Javascript components group that brings easiest and fastest way to build a web application in your way.
https://naver.github.io/egjs
Other
937 stars 81 forks source link

How to remove data in persist #373

Closed sculove closed 7 years ago

sculove commented 8 years ago

Description

a persist couldn't remove previous data. and it couldn't update null or undefined or ""

Steps to check or reproduce

AS-IS

$.persist("key", { val : 10 }); // { val: 10 }
$.persist("key", null); // { val: 10 }
$.persist("key", undefined); // { val: 10 }
$.persist("key", ""); // { val: 10 }

TO-BE

$.persist("key", { val : 10 }); // { val: 10 }
$.persist("key", null); // null
$.persist("key", undefined); // undefined
$.persist("key", ""); // ""