Protocol logic and lint fixes.

This commit is contained in:
orangemug 2019-10-27 17:15:17 +00:00
parent 566201fb45
commit f39fb34f36

View file

@ -32,12 +32,12 @@ class UrlInput extends React.Component {
const protocol = getProtocol(url);
if (
protocol &&
protocol === "https:" &&
window.location.protocol !== "http:"
protocol === "http:" &&
window.location.protocol === "https:"
) {
error = (
<SmallError>
CORs policy won't allow fetching resources served over http from https, use a <code>https://</code> domain
CORs policy won&apos;t allow fetching resources served over http from https, use a <code>https://</code> domain
</SmallError>
);
}