You need to add a key as a second parameter, like
The primary key of the record you want to update (e.g. from IDBCursor.primaryKey). This is only needed for object stores that have an
autoIncrementprimary key, therefore the key is not in a field on the record object. In such cases, calling
put(item)will always insert a new record, because it doesn’t know what existing record you might want to modify.
CLICK HERE to find out more related problems solutions.