Commit 260d158c authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Improve error reporting for port on Firefox

parent bbbde760
......@@ -158,10 +158,14 @@ function connectHost() {
}
});
port.onDisconnect.addListener(function() {
port.onDisconnect.addListener(function(port) {
var error = chrome.runtime.lastError;
// Firefox passes in the port which may then have an error set
if (port && port.error) {
error = port.error;
}
console.warn("Host disconnected", error);
console.warn("Host disconnected", error && error.message);
// Remove all kde connect menu entries since they won't work without a host
try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment