无法在 'IDBKeyRange' 上执行 'only':参数不是有效键

Failed to execute 'only' on 'IDBKeyRange': The parameter is not a valid key

我正在使用 class 使用 jsstore.I 从 indexeddb 获取数据 response.But 得到 "Failed to execute 'only' on 'IDBKeyRange': The parameter is not a valid key. " console error.Why 我明白了 error.can 任何人都可以帮助我。

//Get DBSchema(table & columns)
  private getDbSchema = function () {
    const tblArticle = {
      Name: this._indexedDBLiveDBTableName,
      Columns: [
       {
          Name: 'ParentName',
          NotNull: true,
          DataType: 'string'
        },
        {
          Name: 'ChildName',
          NotNull: true,
          DataType: 'string'
        }
        ,
        {
          Name: 'UpdatedDate',
          NotNull: true,
          DataType: 'string'
        }
      ]
    };

    const Database = {
      Name: this._indexedDBLiveDBName,
      Tables: [tblArticle]
    };
    return Database as any;
  };

 //Fetch articles From IndexedDB
GetArticleFromIndexedDb(section) {
    this._connection.openDb(this._indexedDBLiveDBName);
    return this._connection.select({
      From: this._indexedDBLiveDBTableName,
      Where: {
        ChildName: section
      }
    });
 }

部分的值将类似于 "India"、"TamilNadu"

如有错误请查收附件截图

here

我正在使用 jsstore 1.3.0

我将 jsstore 版本更新为 1.4.1,它提供 "Maximum call stack size exceeded"

谢谢

这是因为提供的值无效。 IndexedDB 支持值列表——数字、日期、字符串、二进制数据、数组:它们是有效的键。

此错误通常在您传递布尔值、空值或未定义值时抛出。

查看 w3c 了解更多信息 - https://w3c.github.io/IndexedDB/#key-construct

对于遇到同样问题并且实际上传递了有效密钥的任何其他人,实际上可能是您 运行ning。

objectStore.put(key, value)

什么时候应该运行

objectStore.put(value, key)

与规格相反。