File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
---
8
8
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
+
9
16
## 1.7.2
10
17
11
18
` 2024-08-09 `
Original file line number Diff line number Diff line change 6
6
7
7
---
8
8
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
+
9
16
## 1.7.2
10
17
11
18
` 2024-08-09 `
Original file line number Diff line number Diff line change @@ -99,13 +99,22 @@ export const checkVersion = (
99
99
worker = createWorker ( createWorkerFunc , [ checkVersionTypeFunc ] )
100
100
}
101
101
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
+
102
110
worker . postMessage ( {
103
111
'version-key' : config . localPackageVersion || '' ,
104
112
'polling-time' : config . pollingTime || 5000 ,
105
113
immediate : config . immediate || false ,
106
114
'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
+ ) ,
109
118
'check-origin-specified-files-url-mode' :
110
119
config . checkOriginSpecifiedFilesUrlMode || 'one' ,
111
120
'clear-interval-on-dialog' : config . clearIntervalOnDialog || false ,
You can’t perform that action at this time.
0 commit comments