defaulting localStorage

what is the best way to default localStorage variables? I tried calling a function on load of the first page and testing if the localStorage variable exists, and if not it sets teh variable, but when I run it I get [23:50:29] Android Device : E/Web Console(12467): Uncaught TypeError: Cannot call method 'setItem' of undefined at file:///mnt/sdcard/data/com.exadel.tiggr.projectlist/app_default/files/views/assets/asset-1298409:102
as an error.
1 person has
this question
This topic is no longer open for comments or replies.