Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary Console Log in registerOnChange Function of ngx-currency #189

Open
kev-creator opened this issue Feb 2, 2024 · 1 comment
Open

Comments

@kev-creator
Copy link

I've noticed an unnecessary console log in the registerOnChange function of the ngx-currency library. Specifically, the console log seems to be used for debugging purposes and might not be suitable for a production environment. Here's the part of the code with the console log:

registerOnChange(fn) {
  this.onChange = (value) => {
    const valueToEmit = value === '' ? null : this.parseLocaleStringToNumber(value);
  -->>  console.log('Emitting value', valueToEmit);  <<----
    fn(valueToEmit);
  };
}
@ArtemDintecom
Copy link
Contributor

@kev-creator Are you sure that you are using this library and not another fork?
The only registerOnChange in this repository looks like this:

registerOnChange(callbackFunction: (value: number | null) => void): void {
this._inputHandler.setOnModelChange(callbackFunction);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants