zotero://select handler: Switch to library tab (#4204)

This commit is contained in:
Abe Jellinek 2024-06-05 00:52:03 -04:00 committed by GitHub
parent 56980080ad
commit eca5f6bea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -895,12 +895,14 @@ function ZoteroProtocolHandler() {
return;
}
var zp = Zotero.getActiveZoteroPane();
var win = Zotero.getMainWindow();
var zp = win?.ZoteroPane;
if (!zp) {
// TEMP
throw new Error("Pane not open");
}
win.Zotero_Tabs.select('zotero-pane');
if (params.objectType == 'collection') {
return zp.collectionsView.selectCollection(results[0].id);
}