Skip to content
Snippets Groups Projects
Commit 909f8d22 authored by Fitz's avatar Fitz
Browse files

bugfix: fix the sources's content has protocol will throw error bug

parent 4004064d
No related branches found
Tags dev-beta-v6
No related merge requests found
This diff is collapsed.
......@@ -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')) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment