We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af1ead5 commit c7404ebCopy full SHA for c7404eb
src/LiveComponent/assets/src/Component/plugins/PollingPlugin.ts
@@ -7,13 +7,13 @@ export default class implements PluginInterface {
7
private element: Element;
8
private pollingDirector: PollingDirector;
9
10
- attachToComponent(component: Component): void {
+ attachToComponent(component: Component & { pollingDirector?: PollingDirector }): void {
11
this.element = component.element;
12
this.pollingDirector = new PollingDirector(component);
13
this.initializePolling();
14
15
// access from stimulus_controller
16
- (component as any).pollingDirector = this.pollingDirector;
+ component.pollingDirector = this.pollingDirector;
17
18
component.on('connect', () => {
19
this.pollingDirector.startAllPolling();
0 commit comments