Skip to content

Commit bb7549a

Browse files
committed
更新[BoxJs]: 修复部分情况下当前会话变双份问题
1 parent 1482845 commit bb7549a

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎box/release/box.release.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
{
22
"releases": [
3+
{
4+
"version": "0.3.6",
5+
"tags": ["beta"],
6+
"author": "@chavyleung",
7+
"icon": "https://avatars3.githubusercontent.com/u/29748519",
8+
"repo": "https://github.com/chavyleung",
9+
"notes": [
10+
{
11+
"name": "修复",
12+
"descs": ["部分情况下当前会话变双份问题"]
13+
}
14+
]
15+
},
316
{
417
"version": "0.3.5",
518
"tags": ["beta"],

‎chavy.box.js‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const $ = new Env('BoxJs')
22
$.domain = '8.8.8.8'
33

4-
$.version = '0.3.5'
4+
$.version = '0.3.6'
55
$.versionType = 'beta'
66
$.KEY_sessions = 'chavy_boxjs_sessions'
77
$.KEY_versions = 'chavy_boxjs_versions'
@@ -13,7 +13,6 @@ $.json = $.name
1313
$.html = $.name
1414

1515
!(async () => {
16-
// $.setdata('', 'github')
1716
const path = getPath($request.url)
1817
// 处理主页请求 => /home
1918
if (/^\/home/.test(path)) {
@@ -301,11 +300,10 @@ function getAppSubs() {
301300
const sub = usercfgs.appsubs[subIdx]
302301
const suburl = sub.url.replace(/[ ]|[\r\n]/g, '')
303302
const cachedsub = usercfgs.appsubCaches[suburl]
304-
if (cachedsub) {
305-
if (Array.isArray(cachedsub.apps)) {
306-
cachedsub._raw = sub
307-
wrapapps(cachedsub.apps)
308-
}
303+
if (cachedsub && Array.isArray(cachedsub.apps)) {
304+
cachedsub._raw = sub
305+
cachedsub.apps.forEach((app) => (app.datas = []))
306+
wrapapps(cachedsub.apps)
309307
appsubs.push(cachedsub)
310308
} else {
311309
sub.isErr = true

0 commit comments

Comments
 (0)