knadh / localStorageDB

A simple database layer for localStorage and sessionStorage for creating structured data in the form of databases and tables
http://nadh.in/code/localstoragedb
814 stars 128 forks source link

Commit could cause problems in IE 9/10/11 [not throwing Quota Exception] #38

Closed orangecoding closed 10 years ago

orangecoding commented 10 years ago

If someone adds data to the storage using the bracket notation like you do within the commit method, it could lead to a strange situation while trying to commit when the size limit of the storage is reached. localStorage["ID"] = "blabla"; is not save to use withing the internet Exlorer. For writing, it's better to use setItem()

A testcase for this is here: http://dev-test.nemikor.com/web-storage/bracket-limit/

knadh commented 10 years ago

Fixed https://github.com/knadh/localStorageDB/commit/7aac5807126f74ef17a86164005c7bbc4b312912