Skip to content

Commit

Permalink
greptile suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom committed Dec 28, 2024
1 parent 571c940 commit d278f01
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ export abstract class BaseComposerRuntimeCore implements ComposerRuntimeCore {
return () => this._subscriptions.delete(callback);
}

public _notifyEventSubscribers(event: ComposerRuntimeEventType) {
private _eventSubscribers = new Map<string, Set<() => void>>();

protected _notifyEventSubscribers(event: ComposerRuntimeEventType) {
const subscribers = this._eventSubscribers.get(event);
if (!subscribers) return;

for (const callback of subscribers) callback();
}

private _eventSubscribers = new Map<string, Set<() => void>>();

public unstable_on(event: ComposerRuntimeEventType, callback: () => void) {
const subscribers = this._eventSubscribers.get(event);
if (!subscribers) {
Expand Down

0 comments on commit d278f01

Please sign in to comment.