Skip to content

"Setting the same device is not allowed." not preventable #572

@rala72

Description

@rala72

Describe the bug
Once you declare the input attribute [(device)] (or [device]) you will get this warning. It is even present in your own demo page: https://zxing-js.github.io/ngx-scanner

To Reproduce
Steps to reproduce the behavior:

  1. Declare component with [(device)] and create a <select> to select the device
  2. Check console

Expected behavior
No warning message to tell me, that angular change detection triggered or a way to prevent it.

Currently using 17.0.4, but also many other versions are affected.
I get that the other warnings mentioned in #204 make sense, but this seems to always be happen if angular change detection triggers once.
I think Angular can handle the change detection well so I would just remove the log message,
but if there is any way to keep the warning while preventing this message from happening, it would be awesome as well.

console.warn('Setting the same device is not allowed.');

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions