Skip to content

Commit

Permalink
chore: replay-only will not register other dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongz committed Oct 10, 2024
1 parent 7759b35 commit 344bee4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages-experimental/action-recorder/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@ export class UniverActionRecorderPlugin extends Plugin {
}

override onStarting(): void {
([
[ActionRecorderService],
[ActionReplayService],
[ActionRecorderController],
] as Dependency[]).forEach((d) => this._injector.add(d));
const dependency = this._config.replayOnly
? [[ActionReplayService]]
: [
[ActionRecorderService],
[ActionReplayService],
[ActionRecorderController],
];
(dependency as Dependency[]).forEach((d) => this._injector.add(d));
}

override onSteady(): void {
Expand Down

0 comments on commit 344bee4

Please sign in to comment.