mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
*
This commit is contained in:
parent
3e4bd81a35
commit
51b8fd216c
@ -100,7 +100,7 @@ export class ComponentHandler extends BaseHandler {
|
|||||||
|
|
||||||
hasComponent(id: string, customId: string) {
|
hasComponent(id: string, customId: string) {
|
||||||
return this.values.get(id)?.components?.some(x => {
|
return this.values.get(id)?.components?.some(x => {
|
||||||
if (typeof x.match === 'string' && x.match === customId) return true;
|
if (typeof x.match === 'string') return x.match === customId;
|
||||||
if (Array.isArray(x.match)) return x.match.includes(customId);
|
if (Array.isArray(x.match)) return x.match.includes(customId);
|
||||||
return customId.match(x.match);
|
return customId.match(x.match);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user