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

TypeError: row[field] is null at localstoragedb.js (line 137) #12

Closed asgraf closed 11 years ago

asgraf commented 11 years ago

Example code to reproduce the error:

var lib = new localStorageDB("library2"); if( lib.isNew() ) { lib.createTable("books", ["code", "title", "author", "year", "copies"]); } lib.insertOrUpdate("books", {code: 'B003'}, {code: "B003",title: "Freakonomics",author: "Levitt and Dubner",year: 2005,copies: 15}); lib.commit();

knadh commented 11 years ago

https://github.com/knadh/localStorageDB/commit/09005a2a4799d7d12b0b20b907c4791c5add4db7 fixes the issue.