fix: guard stopManualPhoto() call — mode switching threw ReferenceError
setAddAssetMode() called stopManualPhoto() which was removed during the canvas→file-input refactor. Every mode switch failed silently.
This commit is contained in:
+2
-2
@@ -809,7 +809,7 @@
|
||||
═══════════════════════════════════════════════════════════════════════ -->
|
||||
<div id="tabAddAsset" class="tab-panel active">
|
||||
<!-- Hidden photo picker input -->
|
||||
<input type="file" id="photoPicker" accept="image/*" capture="environment" style="display:none;" onchange="handlePickedPhoto(event)">
|
||||
<input type="file" id="photoPicker" accept="image/*" style="display:none;">
|
||||
<!-- Mode Toggles -->
|
||||
<div class="mode-toggles">
|
||||
<button class="mode-toggle active" data-mode="barcode" onclick="setAddAssetMode('barcode')">📷 Barcode</button>
|
||||
@@ -1693,7 +1693,7 @@
|
||||
// Stop any running scanners
|
||||
stopScanning();
|
||||
stopOcrCamera();
|
||||
stopManualPhoto();
|
||||
if (typeof stopManualPhoto === 'function') stopManualPhoto();
|
||||
|
||||
if (mode === 'barcode') {
|
||||
startScanning();
|
||||
|
||||
Reference in New Issue
Block a user