superfeedr / indexeddb-backbonejs-adapter

An indexedDB adapter for Backbonejs
http://blog.superfeedr.com/indexeddb-backbonejs-adapter/
MIT License
248 stars 61 forks source link

Ensure migration version is integer #84

Open gasi-signal opened 6 years ago

gasi-signal commented 6 years ago

The spec calls for version to be an unsigned long long. Using strings such as "1.0" and "1.1" that maybe parsed as the same integers may cause unexpected behavior:

> node
> parseInt("1.0", 10);
1
> parseInt("1.1", 10);
1

Reference: https://www.w3.org/TR/IndexedDB-2/#factory-interface