mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-19 05:53:50 +08:00
chore(style): use eqeqeq
(#1013)
This commit is contained in:
@ -89,9 +89,8 @@
|
|||||||
"no-unused-vars": "off",
|
"no-unused-vars": "off",
|
||||||
"react/no-deprecated": "error",
|
"react/no-deprecated": "error",
|
||||||
"react/jsx-key": "error",
|
"react/jsx-key": "error",
|
||||||
// TODO(qianxi): should be error
|
|
||||||
"no-console": "error",
|
"no-console": "error",
|
||||||
"eqeqeq": "warn",
|
"eqeqeq": "error",
|
||||||
|
|
||||||
"react/prop-types": "off",
|
"react/prop-types": "off",
|
||||||
"react/display-name": "off",
|
"react/display-name": "off",
|
||||||
|
@ -164,7 +164,7 @@ class LoginPage extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
// OAuth
|
// OAuth
|
||||||
const oAuthParams = Util.getOAuthGetParameters();
|
const oAuthParams = Util.getOAuthGetParameters();
|
||||||
if (oAuthParams !== null && oAuthParams.responseType != null && oAuthParams.responseType !== "") {
|
if (oAuthParams !== null && oAuthParams.responseType !== null && oAuthParams.responseType !== "") {
|
||||||
values["type"] = oAuthParams.responseType;
|
values["type"] = oAuthParams.responseType;
|
||||||
} else {
|
} else {
|
||||||
values["type"] = this.state.type;
|
values["type"] = this.state.type;
|
||||||
@ -175,11 +175,11 @@ class LoginPage extends React.Component {
|
|||||||
values["samlRequest"] = oAuthParams.samlRequest;
|
values["samlRequest"] = oAuthParams.samlRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (values["samlRequest"] != null && values["samlRequest"] !== "") {
|
if (values["samlRequest"] !== null && values["samlRequest"] !== "" && values["samlRequest"] !== undefined) {
|
||||||
values["type"] = "saml";
|
values["type"] = "saml";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.owner != null) {
|
if (this.state.owner !== null) {
|
||||||
values["organization"] = this.state.owner;
|
values["organization"] = this.state.owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,7 +582,7 @@ class SignupPage extends React.Component {
|
|||||||
{i18next.t("signup:Have account?")}
|
{i18next.t("signup:Have account?")}
|
||||||
<a onClick={() => {
|
<a onClick={() => {
|
||||||
const linkInStorage = sessionStorage.getItem("signinUrl");
|
const linkInStorage = sessionStorage.getItem("signinUrl");
|
||||||
if(linkInStorage != null) {
|
if(linkInStorage !== null && linkInStorage !== "") {
|
||||||
Setting.goToLink(linkInStorage);
|
Setting.goToLink(linkInStorage);
|
||||||
}else{
|
}else{
|
||||||
Setting.goToLogin(this, application);
|
Setting.goToLogin(this, application);
|
||||||
|
@ -35,7 +35,7 @@ const resources = {
|
|||||||
|
|
||||||
function initLanguage() {
|
function initLanguage() {
|
||||||
let language = localStorage.getItem("language");
|
let language = localStorage.getItem("language");
|
||||||
if (language === undefined || language == null) {
|
if (language === undefined || language === null || language === "") {
|
||||||
if (Conf.ForceLanguage !== "") {
|
if (Conf.ForceLanguage !== "") {
|
||||||
language = Conf.ForceLanguage;
|
language = Conf.ForceLanguage;
|
||||||
} else {
|
} else {
|
||||||
|
@ -75,7 +75,7 @@ function registerValidSW(swUrl, config) {
|
|||||||
.then(registration => {
|
.then(registration => {
|
||||||
registration.onupdatefound = () => {
|
registration.onupdatefound = () => {
|
||||||
const installingWorker = registration.installing;
|
const installingWorker = registration.installing;
|
||||||
if (installingWorker == null) {
|
if (installingWorker === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
installingWorker.onstatechange = () => {
|
installingWorker.onstatechange = () => {
|
||||||
@ -126,7 +126,7 @@ function checkValidServiceWorker(swUrl, config) {
|
|||||||
const contentType = response.headers.get("content-type");
|
const contentType = response.headers.get("content-type");
|
||||||
if (
|
if (
|
||||||
response.status === 404 ||
|
response.status === 404 ||
|
||||||
(contentType != null && contentType.indexOf("javascript") === -1)
|
(contentType !== null && contentType.indexOf("javascript") === -1)
|
||||||
) {
|
) {
|
||||||
// No service worker found. Probably a different app. Reload the page.
|
// No service worker found. Probably a different app. Reload the page.
|
||||||
navigator.serviceWorker.ready.then(registration => {
|
navigator.serviceWorker.ready.then(registration => {
|
||||||
|
Reference in New Issue
Block a user