File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77---
88
9+ ## 1.7.3
10+
11+ ` 2024-09-19 `
12+
13+ [ #50 ] ( https://github.com/guMcrey/version-rocket/issues/50 ) (Thanks to [ Jolie] ( https://github.com/newives ) for the feedback)
14+ - 🪲 Fix the syntax error of the expression ` [...new Set(config.checkOriginSpecifiedFilesUrl)] || [] ` in TypeScript.
15+
916## 1.7.2
1017
1118` 2024-08-09 `
Original file line number Diff line number Diff line change 66
77---
88
9+ ## 1.7.3
10+
11+ ` 2024-09-19 `
12+
13+ [ #50 ] ( https://github.com/guMcrey/version-rocket/issues/50 ) (感谢 [ Jolie] ( https://github.com/newives ) 同学的反馈)
14+ - 🪲 修复 ` [...new Set(config.checkOriginSpecifiedFilesUrl)] || [] ` 表达式在 Typescript 中的语法错误
15+
916## 1.7.2
1017
1118` 2024-08-09 `
Original file line number Diff line number Diff line change @@ -99,13 +99,22 @@ export const checkVersion = (
9999 worker = createWorker ( createWorkerFunc , [ checkVersionTypeFunc ] )
100100 }
101101
102+ const processUserInput = ( input : any ) => {
103+ if ( ! Array . isArray ( input ) ) {
104+ console . warn ( 'Invalid input: Expected an array.' )
105+ return [ ]
106+ }
107+ return [ ...new Set ( input ) ] . filter ( ( item ) => item != null )
108+ }
109+
102110 worker . postMessage ( {
103111 'version-key' : config . localPackageVersion || '' ,
104112 'polling-time' : config . pollingTime || 5000 ,
105113 immediate : config . immediate || false ,
106114 'origin-version-file-url' : config . originVersionFileUrl || '' ,
107- 'check-origin-specified-files-url' :
108- [ ...new Set ( config . checkOriginSpecifiedFilesUrl ) ] || [ ] ,
115+ 'check-origin-specified-files-url' : processUserInput (
116+ config . checkOriginSpecifiedFilesUrl
117+ ) ,
109118 'check-origin-specified-files-url-mode' :
110119 config . checkOriginSpecifiedFilesUrlMode || 'one' ,
111120 'clear-interval-on-dialog' : config . clearIntervalOnDialog || false ,
You can’t perform that action at this time.
0 commit comments