Closed xethlyx closed 4 weeks ago
import type { Components } from '@flamework/components'; import { BaseComponent, Component } from '@flamework/components'; import type { OnStart } from '@flamework/core'; import { Service } from '@flamework/core'; import { Workspace } from '@rbxts/services'; interface Attributes {} @Component({ tag: 'Test', predicate: () => false, }) export class MyComponent extends BaseComponent<Attributes> { constructor() { super(); print('i was constructed'); } } @Service({}) export class Test implements OnStart { constructor(private readonly components: Components) {} onStart() { const part = new Instance('Part'); part.Parent = Workspace; part.AddTag('Test'); this.components.getComponent<MyComponent>(part); } }
This results in i was constructed being output, despite predicate always returning false
i was constructed
Fixed in https://github.com/rbxts-flamework/components/commit/07ae23a7cf5bb53cc3ba97b44f75fe2f51719496
This results in
i was constructed
being output, despite predicate always returning false