Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
9c594a8a96
commit
5e73a212f4
124 changed files with 417 additions and 250 deletions
|
@ -85,13 +85,13 @@ export default class CaptchaForm extends React.Component<ICaptchaFormProps, ICap
|
|||
|
||||
private renderRecaptcha(divId: string) {
|
||||
if (!this.isRecaptchaReady()) {
|
||||
console.error("grecaptcha not loaded!");
|
||||
logger.error("grecaptcha not loaded!");
|
||||
throw new Error("Recaptcha did not load successfully");
|
||||
}
|
||||
|
||||
const publicKey = this.props.sitePublicKey;
|
||||
if (!publicKey) {
|
||||
console.error("No public key for recaptcha!");
|
||||
logger.error("No public key for recaptcha!");
|
||||
throw new Error(
|
||||
"This server has not supplied enough information for Recaptcha "
|
||||
+ "authentication");
|
||||
|
|
|
@ -32,6 +32,8 @@ import RegistrationEmailPromptDialog from '../dialogs/RegistrationEmailPromptDia
|
|||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import CountryDropdown from "./CountryDropdown";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
enum RegistrationField {
|
||||
Email = "field_email",
|
||||
PhoneNumber = "field_phone_number",
|
||||
|
@ -84,7 +86,7 @@ interface IState {
|
|||
@replaceableComponent("views.auth.RegistrationForm")
|
||||
export default class RegistrationForm extends React.PureComponent<IProps, IState> {
|
||||
static defaultProps = {
|
||||
onValidationChange: console.error,
|
||||
onValidationChange: logger.error,
|
||||
canSubmit: true,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue