diff --git a/backend/app/controllers/tags_controller.rb b/backend/app/controllers/tags_controller.rb index 0cb8dd5..aed029f 100644 --- a/backend/app/controllers/tags_controller.rb +++ b/backend/app/controllers/tags_controller.rb @@ -434,5 +434,7 @@ class TagsController < ApplicationController return canonical if canonical html[/"channelId":"(UC[a-zA-Z0-9_-]{22})"/, 1] || html[/\bUC[a-zA-Z0-9_-]{22}\b/] + rescue + nil end end diff --git a/frontend/src/components/TagLink.tsx b/frontend/src/components/TagLink.tsx index 81b108f..a68f8a9 100644 --- a/frontend/src/components/TagLink.tsx +++ b/frontend/src/components/TagLink.tsx @@ -55,7 +55,7 @@ export default (({ tag, ? ) : ( - tag.hasWiki + tag.materialId != null ? ( = { nico: 'ニコニコ', youtube: 'YouTube' } as const -export const PLATFORMS = ['nico', 'youtube'] as const - export const TAG_COLOUR = { deerjikist: 'rose', meme: 'purple', diff --git a/frontend/src/pages/deerjikists/DeerjikistDetailPage.tsx b/frontend/src/pages/deerjikists/DeerjikistDetailPage.tsx index 5f07907..ee3651f 100644 --- a/frontend/src/pages/deerjikists/DeerjikistDetailPage.tsx +++ b/frontend/src/pages/deerjikists/DeerjikistDetailPage.tsx @@ -65,7 +65,7 @@ export default (() => { setData (deerjikists) setDisabled (false) - }, [deerjikists]) + }, [tag, deerjikists]) return (