Skip to content

Commit

Permalink
fix(boxjs): 还原 gist 可能导致的白屏
Browse files Browse the repository at this point in the history
  • Loading branch information
chavyleung committed May 20, 2022
1 parent b9ca656 commit c1da618
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
6 changes: 3 additions & 3 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.12.0'
$.version = '0.12.1'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down Expand Up @@ -505,14 +505,14 @@ function getUserApps() {
* 获取应用会话
*/
function getAppSessions() {
return $.getjson($.KEY_sessions, [])
return $.getjson($.KEY_sessions, []) || []
}

/**
* 获取当前切换到哪个会话
*/
function getCurSessions() {
return $.getjson($.KEY_cursessions, {})
return $.getjson($.KEY_cursessions, {}) || {}
}

/**
Expand Down
12 changes: 12 additions & 0 deletions box/release/box.release.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"releases": [
{
"version": "0.12.1",
"tags": ["beta"],
"author": "@chavyleung",
"msg": "fix(boxjs): 还原 gist 可能导致的白屏",
"notes": [
{
"name": "修复",
"descs": ["还原 gist 可能导致的白屏"]
}
]
},
{
"version": "0.12.0",
"tags": ["beta"],
Expand Down
12 changes: 12 additions & 0 deletions box/release/box.release.tf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"releases": [
{
"version": "0.12.1",
"tags": ["beta"],
"author": "@chavyleung",
"msg": "fix(boxjs): 还原 gist 可能导致的白屏",
"notes": [
{
"name": "修复",
"descs": ["还原 gist 可能导致的白屏"]
}
]
},
{
"version": "0.12.0",
"tags": ["beta"],
Expand Down
4 changes: 2 additions & 2 deletions box/scripts/boxjs.revert.usercfgs.sessions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 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.12.0'
$.version = '0.12.1'
$.versionType = 'beta'

// 发出的请求需要需要 Surge、QuanX 的 rewrite
Expand Down Expand Up @@ -505,14 +505,14 @@ function getUserApps() {
* 获取应用会话
*/
function getAppSessions() {
return $.getjson($.KEY_sessions, [])
return $.getjson($.KEY_sessions, []) || []
}

/**
* 获取当前切换到哪个会话
*/
function getCurSessions() {
return $.getjson($.KEY_cursessions, {})
return $.getjson($.KEY_cursessions, {}) || {}
}

/**
Expand Down

0 comments on commit c1da618

Please sign in to comment.