Skip to content

Instantly share code, notes, and snippets.

@sebastianwagner
Created July 2, 2013 15:16
Show Gist options
  • Save sebastianwagner/5910174 to your computer and use it in GitHub Desktop.
Save sebastianwagner/5910174 to your computer and use it in GitHub Desktop.
Fix gnome3 js fuckup in bluetooth component throwing errors when logging in.
diff --git a/bluetooth.js b/bluetooth.js
index f6d2f30..8af2fd3 100644
--- a/bluetooth.js
+++ b/bluetooth.js
@@ -93,6 +93,7 @@ const Indicator = new Lang.Class({
},
_updateKillswitch: function() {
+ if(typeof GnomeBluetoothApplet == 'undefined' || typeof GnomeBluetoothApplet.killswitch_state == 'undefined') return;
let current_state = this._applet.killswitch_state;
let on = current_state == GnomeBluetoothApplet.KillswitchState.UNBLOCKED;
let has_adapter = current_state != GnomeBluetoothApplet.KillswitchState.NO_ADAPTER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment