mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Detect undefined component
This commit is contained in:
parent
ed61eea287
commit
687d875e41
@ -82,6 +82,10 @@ export const isComponentEnabled = (component: ComponentMetadata | string) => {
|
||||
if (typeof component === 'string') {
|
||||
component = componentsMap[component]
|
||||
}
|
||||
// 不存在 / 未安装的组件
|
||||
if (!component) {
|
||||
return false
|
||||
}
|
||||
// 若指定了排除URL, 任意URL匹配就不加载
|
||||
if (component.urlExclude && component.urlExclude.some(matchUrlPattern)) {
|
||||
return false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user