yathit / ydn-db

Javascript database module for Indexeddb, Web SQL and localStorage storage mechanisms supporting version migration, advanced query, SQL and transaction.
Apache License 2.0
503 stars 41 forks source link

Internet Explorer 7 string indexes #35

Closed Dragiyski closed 9 years ago

Dragiyski commented 9 years ago

Application return proper number for rows found for db.values, however they are all undefined, while in localStorage data is present.

//src/ydn/db/base/utils.js:503
  return this.current = this.index < this.lastIndex ? parseInt(this.string[++this.index] +
    this.string[++this.index], 16) : null;

Using indexes in string is unsupported in ES3 (IE7+) rendering library useless for IE7-, however this easy fix restore the support for IE7, while not affecting modern browsers:

//src/ydn/db/base/utils.js:503
  return this.current = this.index < this.lastIndex ? parseInt(this.string.charAt(++this.index) +
    this.string.charAt(++this.index), 16) : null;
yathit commented 9 years ago

Thanks.

Merged in rel 1.1.2. Please verify and close this ticket.