Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
221aa0022
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
221aa0022
Commits
909f8d22
Commit
909f8d22
authored
2 years ago
by
Fitz
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: fix the sources's content has protocol will throw error bug
parent
4004064d
No related branches found
Branches containing commit
Tags
dev-beta-v6
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dist/index.js
+17
-17
17 additions, 17 deletions
dist/index.js
src/utils/util.ts
+5
-1
5 additions, 1 deletion
src/utils/util.ts
with
22 additions
and
18 deletions
dist/index.js
+
17
−
17
View file @
909f8d22
This diff is collapsed.
Click to expand it.
src/utils/util.ts
+
5
−
1
View file @
909f8d22
...
...
@@ -268,9 +268,13 @@ export function sourcesValidate(sources: Array<SourceConfig>): Array<string> {
errmsgs
.
push
(
`sources's NO.
${
index
}
item verify fail,Pleas fill in sources's type with
${
SOURCE_TYPES
.
join
(
"
|
"
)}
`
);
}
if
(
!
i
.
content
)
{
const
content
=
i
.
content
;
const
indexOf
=
content
.
indexOf
(
"
//
"
);
if
(
indexOf
==
content
.
length
-
1
)
{
errmsgs
.
push
(
`sources's NO.
${
index
}
item verify fail,sources's content is required!`
);
}
i
.
content
=
content
.
substring
(
indexOf
+
1
);
const
sourcePort
=
i
.
port
;
if
(
sourcePort
&&
!
(
typeof
sourcePort
==
'
number
'
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment