未验证 提交 fa9f4138 编写于 作者: P PM Extra 提交者: GitHub

Fix a small bug of JsonValidation

The origin condition expression `(!strings.startsWith(uri, 'https:/') && strings.startsWith(uri, 'https:/'))` is always false.
According to the context code, it should be `(!strings.startsWith(uri, 'http://') && !strings.startsWith(uri, 'https://'))` instead.
上级 127c3448
......@@ -69,7 +69,7 @@ export class JSONValidationExtensionPoint {
} catch (e) {
collector.error(nls.localize('invalid.url.fileschema', "'configuration.jsonValidation.url' is an invalid relative URL: {0}", e.message));
}
} else if (!strings.startsWith(uri, 'https:/') && strings.startsWith(uri, 'https:/')) {
} else if (!strings.startsWith(uri, 'http://') && !strings.startsWith(uri, 'https://')) {
collector.error(nls.localize('invalid.url.schema', "'configuration.jsonValidation.url' must start with 'http:', 'https:' or './' to reference schemas located in the extension"));
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册