Browse Source

fix(frontend): IDMB ID 规则判断错误 fix #645

Myon 2 years ago
parent
commit
77cf2f3fb4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      frontend/src/utils/common.js

+ 1 - 1
frontend/src/utils/common.js

@@ -9,5 +9,5 @@ export const gotoGithubIssuePage = () => {
 export const isImdbId = (str) => {
   if (!str) return false;
   if (str === 'tt00000') return false;
-  return str.startsWith('tt') && str.length === 9;
+  return /^tt\d{7,8}$/.test(str);
 };