Skip to content

Commit

Permalink
#559 ZxingScannerComponen.init method called twice when enable flag i…
Browse files Browse the repository at this point in the history
…s set to true (leak once again)
  • Loading branch information
werthdavid committed Apr 25, 2024
1 parent 0921fb2 commit de3d42c
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 de3d42c

Please sign in to comment.