diff --git a/index.html b/index.html index 9eed009..4ba8121 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,8 @@ diff --git a/package.json b/package.json index cf8fc59..2c693ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.25.6", + "version": "0.25.7", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/database.ts b/src/database.ts index 0ad10f8..b2fe710 100644 --- a/src/database.ts +++ b/src/database.ts @@ -12,7 +12,10 @@ export class Database { constructor(public readonly database: string, tables: (string | TableOptions)[], public version?: number) { this.connection = new Promise((resolve, reject) => { const req = indexedDB.open(this.database, this.version); - this.tables = tables.map(t => typeof t == 'object' ? t : {name: t}); + this.tables = tables.map(t => { + t = typeof t == 'object' ? t : {name: t}; + return {...t, name: t.name.toString()}; + }); const tableNames = new ASet(this.tables.map(t => t.name)); req.onerror = () => reject(req.error);