diff --git a/static/js/modes/bluetooth.js b/static/js/modes/bluetooth.js index cd7c563..4647dee 100644 --- a/static/js/modes/bluetooth.js +++ b/static/js/modes/bluetooth.js @@ -1790,14 +1790,8 @@ const BluetoothMode = (function() { mac_cluster_count: device.mac_cluster_count || 0 }; - // If BtLocate is already loaded, hand off directly - if (typeof BtLocate !== 'undefined') { - BtLocate.handoff(payload); - return; - } - - // Switch to bt_locate mode first — this loads the script, styles, - // and initializes the module. Then hand off the device data. + // Always switch to bt_locate mode first (loads script + styles if needed, + // initializes the module), then hand off device data. if (typeof switchMode === 'function') { switchMode('bt_locate').then(function() { if (typeof BtLocate !== 'undefined') { diff --git a/static/js/modes/bt_locate.js b/static/js/modes/bt_locate.js index a52d127..ee5f521 100644 --- a/static/js/modes/bt_locate.js +++ b/static/js/modes/bt_locate.js @@ -1792,11 +1792,6 @@ const BtLocate = (function() { const irkInput = document.getElementById('btLocateIrk'); if (irkInput) irkInput.value = deviceInfo.irk_hex; } - - // Switch to bt_locate mode - if (typeof switchMode === 'function') { - switchMode('bt_locate'); - } } function clearHandoff() {