WebAPI.initialize: add missing validity check for proxyUrl (#4565)

This commit is contained in:
iomintz 2020-10-12 17:08:43 -05:00 committed by GitHub
parent ce6cf7b439
commit 6e7930f7a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -895,6 +895,9 @@ export function initialize({
if (!is.string(contentProxyUrl)) {
throw new Error('WebAPI.initialize: Invalid contentProxyUrl');
}
if (proxyUrl && !is.string(proxyUrl)) {
throw new Error('WebAPI.initialize: Invalid proxyUrl');
}
if (!is.string(version)) {
throw new Error('WebAPI.initialize: Invalid version');
}