Skip to content

Commit

Permalink
Merge pull request #561 from zxing-js/bugfix/559-enable
Browse files Browse the repository at this point in the history
#559 ZxingScannerComponen.init method called twice when enable flag i…
  • Loading branch information
werthdavid authored Apr 25, 2024
2 parents 0921fb2 + de3d42c commit c4d3a40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/zxing-scanner/src/lib/zxing-scanner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ export class ZXingScannerComponent implements OnInit, OnDestroy {
@Input()
set enable(enabled: boolean) {

if (this._enabled === Boolean(enabled)) {
return;
}

this._enabled = Boolean(enabled);

if (!this._enabled) {
Expand Down

0 comments on commit c4d3a40

Please sign in to comment.