Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(js): 错误的js脚本也返回给前端,便于进行删除 #363

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dice/dice_jsvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ type JsScriptInfo struct {
/** 最近一条错误文本 */
ErrText string `json:"errText"`
/** 实际文件名 */
Filename string
Filename string `json:"filename"`
/** 更新链接 */
UpdateUrls []string `json:"updateUrls"`
/** etag */
Expand Down Expand Up @@ -600,10 +600,10 @@ func (d *Dice) JsLoadScriptRaw(s string, info fs.FileInfo) {
if err != nil {
errText := err.Error()
jsInfo.ErrText = errText
jsInfo.Enable = false
d.Logger.Error("读取脚本失败(解析失败): ", errText)
} else {
d.JsScriptList = append(d.JsScriptList, jsInfo)
}
d.JsScriptList = append(d.JsScriptList, jsInfo)
}

func JsDelete(_ *Dice, jsInfo *JsScriptInfo) {
Expand Down