mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Desktop: Fixes #7354: Open callback URLs from within the application
This commit is contained in:
parent
fab2271c9f
commit
6ece7f4c1b
@ -16,8 +16,13 @@ export const runtime = (): CommandRuntime => {
|
||||
if (!link) throw new Error('Link cannot be empty');
|
||||
|
||||
if (link.startsWith('joplin://') || link.startsWith(':/')) {
|
||||
const { itemId, hash } = parseResourceUrl(link);
|
||||
await openItemById(itemId, context.dispatch, hash);
|
||||
const parsedUrl = parseResourceUrl(link);
|
||||
if (parsedUrl) {
|
||||
const { itemId, hash } = parsedUrl;
|
||||
await openItemById(itemId, context.dispatch, hash);
|
||||
} else {
|
||||
void require('electron').shell.openExternal(link);
|
||||
}
|
||||
} else if (urlProtocol(link)) {
|
||||
if (link.indexOf('file://') === 0) {
|
||||
// When using the file:// protocol, openPath doesn't work (does
|
||||
|
Loading…
Reference in New Issue
Block a user