Skip to content

Commit

Permalink
fix(boxjs): 订阅缓存问题
Browse files Browse the repository at this point in the history
  • Loading branch information
gideonsenku committed Jul 15, 2024
1 parent 77c5ddc commit 1a7aea3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions box/chavy.boxjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
// 为 eval 准备的上下文环境
const $eval_env = {}

$.version = '0.19.4'
$.version = '0.19.5'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down Expand Up @@ -927,7 +927,7 @@ function reloadAppSubCache(url) {
subcaches[url] = $.toObj(resp.body)
subcaches[url].updateTime = new Date()
// 仅缓存存在 id 的订阅
$.setjson(subcaches.filter(e => !!e.id), $.KEY_app_subCaches)
$.setjson(subcaches.filter(e => !!subcaches?.[url]?.id), $.KEY_app_subCaches)
$.log(`更新订阅, 成功! ${url}`)
} catch (e) {
$.logErr(e)
Expand Down
2 changes: 1 addition & 1 deletion box/release/box.release.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"releases": [
{
"version": "0.19.4",
"version": "0.19.5",
"tags": ["beta"],
"author": "@GideonSenku",
"msg": "fix(boxjs): 订阅缓存问题",
Expand Down
2 changes: 1 addition & 1 deletion box/release/box.release.tf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"releases": [
{
"version": "0.19.4",
"version": "0.19.5",
"tags": ["beta"],
"author": "@GideonSenku",
"msg": "fix(boxjs): 订阅缓存问题",
Expand Down
4 changes: 2 additions & 2 deletions chavy.box.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
// 为 eval 准备的上下文环境
const $eval_env = {}

$.version = '0.19.4'
$.version = '0.19.5'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down Expand Up @@ -927,7 +927,7 @@ function reloadAppSubCache(url) {
subcaches[url] = $.toObj(resp.body)
subcaches[url].updateTime = new Date()
// 仅缓存存在 id 的订阅
$.setjson(subcaches.filter(e => !!e.id), $.KEY_app_subCaches)
$.setjson(subcaches.filter(e => !!subcaches?.[url]?.id), $.KEY_app_subCaches)
$.log(`更新订阅, 成功! ${url}`)
} catch (e) {
$.logErr(e)
Expand Down

0 comments on commit 1a7aea3

Please sign in to comment.