Skip to content

Commit

Permalink
🐛 修复某些.user.js url 加载错误
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Jun 2, 2023
1 parent a1b96b9 commit 2596617
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pkg/utils/script.ts
Expand Up @@ -59,6 +59,9 @@ export function parseMetadata(code: string): Metadata | null {
if (ret.name === undefined) {
return null;
}
if (Object.keys(ret).length < 3) {
return null;
}
if (!ret.namespace) {
ret.namespace = [""];
}
Expand Down

0 comments on commit 2596617

Please sign in to comment.