mumingfang / jvmaoTab

一个浏览器新标签页插件
https://jvmao.net
MIT License
15 stars 1 forks source link

TypeError: Cannot read properties of undefined (reading 'key') #2

Closed longlongvip closed 1 week ago

longlongvip commented 1 week ago

图示

image

错误信息

TypeError: Cannot read properties of undefined (reading 'key')

控制台报错信息

styled-components.browser.esm-1bf82734.js:40 TypeError: Cannot read properties of undefined (reading 'key')
    at Home-72e65540.js:290:819
    at Mi (LinkItem-641d9e62.js:28:17514)
    at c9 (Home-72e65540.js:290:705)
    at index-ee2f2b80.js:102:52792
    at index-ee2f2b80.js:102:51969
    at q1 (index-ee2f2b80.js:102:12963)
    at t.track (index-ee2f2b80.js:102:17819)
    at O8 (index-ee2f2b80.js:102:51946)
    at s (index-ee2f2b80.js:102:52771)
    at Cm (styled-components.browser.esm-1bf82734.js:38:17028)

导出的数据

{
  "formatName": "dexie",
  "formatVersion": 1,
  "data": {
    "databaseName": "jvmao-tab",
    "databaseVersion": 1.4,
    "tables": [
      {
        "name": "link",
        "schema": "++linkId,title,url,&timeKey,sort,parentId,hide",
        "rowCount": 0
      },
      {
        "name": "option",
        "schema": "++id,&key,value",
        "rowCount": 1
      },
      {
        "name": "note",
        "schema": "++id,content,createTime,updateTime,fromUrl,sort",
        "rowCount": 0
      }
    ],
    "data": [{
      "tableName": "link",
      "inbound": true,
      "rows": []
    },{
      "tableName": "option",
      "inbound": true,
      "rows": [
        {
          "key": "v",
          "value": 12,
          "id": 1
        }
      ]
    },{
      "tableName": "note",
      "inbound": true,
      "rows": []
    }]
  }
}

相关代码

// styled-components.browser.esm-1bf82734.js
function Av(e, t) {
    try {
        console.error(t.value)
    } catch (n) {
        setTimeout(function() {
            throw n
        })
    }
}
mumingfang commented 1 week ago

很奇怪是什么原因 option表是空的,或者你故意修改过json,应该是搜索源的基础数据没有了导致的
QQ20241120-204612

跟着截图做一遍,option表里的 v 字段是控制默认版本的,直接删除会重置一下所有选项。

现在(1.2.7)这个重置按钮 还是一个临时的功能,没有做loading结束,等一会看到option表发生数据变化了就可以 刷新了

longlongvip commented 1 week ago

很奇怪是什么原因 option表是空的,或者你故意修改过json,应该是搜索源的基础数据没有了导致的 QQ20241120-204612

跟着截图做一遍,option表里的 v 字段是控制默认版本的,直接删除会重置一下所有选项。

现在(1.2.7)这个重置按钮 还是一个临时的功能,没有做loading结束,等一会看到option表发生数据变化了就可以 刷新了

好使