From ace2a4df3b4982d375947323e35b3e6c4db7af5f Mon Sep 17 00:00:00 2001 From: ekzyis <27162016+ekzyis@users.noreply.github.com> Date: Thu, 1 Jun 2023 02:49:28 +0200 Subject: [PATCH] Match any port in dupe check (#297) Co-authored-by: ekzyis --- api/resolvers/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 382e449a..a45c032c 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -639,7 +639,7 @@ export default { }, dupes: async (parent, { url }, { me, models }) => { const urlObj = new URL(ensureProtocol(url)) - let uri = urlObj.hostname + urlObj.pathname + let uri = urlObj.hostname + '(:[0-9]+)?' + urlObj.pathname uri = uri.endsWith('/') ? uri.slice(0, -1) : uri const parseResult = parse(urlObj.hostname)