mirror of https://github.com/keeweb/keeweb.git
fix #506: auto-type for empty window title
This commit is contained in:
parent
7cd93c0b6b
commit
41c40bc86e
|
@ -32,13 +32,13 @@ AutoTypeHelper.prototype.getActiveWindowTitle = function(callback) {
|
|||
AutoTypeHelper.exec(ChromeScript.replace(/\{}/g, appName), (err, out) => {
|
||||
if (err) { return callback(err); }
|
||||
const parts = out.split('\n');
|
||||
return callback(null, parts[1].trim(), parts[0].trim());
|
||||
return callback(null, (parts[1] || '').trim(), parts[0].trim());
|
||||
});
|
||||
} else if (['Safari', 'Webkit'].indexOf(appName) >= 0) {
|
||||
AutoTypeHelper.exec(SafariScript.replace(/\{}/g, appName), (err, out) => {
|
||||
if (err) { return callback(err); }
|
||||
const parts = out.split('\n');
|
||||
return callback(null, parts[1].trim(), parts[0].trim());
|
||||
return callback(null, (parts[1] || '').trim(), parts[0].trim());
|
||||
});
|
||||
} else {
|
||||
// special cases are not available. this method may ask the user about assistive access
|
||||
|
|
Loading…
Reference in New Issue