mirror of
https://github.com/outline/outline.git
synced 2026-01-06 02:59:54 -06:00
fix: Handle github.com links that are not resources
This commit is contained in:
@@ -186,11 +186,12 @@ export class GitHub {
|
||||
const parts = pathname.split("/");
|
||||
const owner = parts[1];
|
||||
const repo = parts[2];
|
||||
const type = pluralize.singular(parts[3]) as Resource;
|
||||
const type = parts[3]
|
||||
? (pluralize.singular(parts[3]) as Resource)
|
||||
: undefined;
|
||||
const id = parts[4];
|
||||
|
||||
if (!GitHub.supportedResources.includes(type)) {
|
||||
Logger.warn(`Unsupported GitHub resource type: ${type}`);
|
||||
if (!type || !GitHub.supportedResources.includes(type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user