Skip to content

Commit 9bbe385

Browse files
committed
fix: don't dispose the $analyticsService instance from preview command
1 parent fa000ea commit 9bbe385

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

lib/commands/preview.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ export class PreviewCommand implements ICommand {
44
public allowedParameters: ICommandParameter[] = [];
55
private static MIN_SUPPORTED_WEBPACK_VERSION = "0.17.0";
66

7-
constructor(private $bundleValidatorHelper: IBundleValidatorHelper,
7+
constructor(private $analyticsService: IAnalyticsService,
8+
private $bundleValidatorHelper: IBundleValidatorHelper,
89
private $errors: IErrors,
910
private $liveSyncService: ILiveSyncService,
1011
private $logger: ILogger,
1112
private $networkConnectivityValidator: INetworkConnectivityValidator,
1213
private $projectData: IProjectData,
1314
private $options: IOptions,
1415
private $previewAppLogProvider: IPreviewAppLogProvider,
15-
private $previewQrCodeService: IPreviewQrCodeService) { }
16+
private $previewQrCodeService: IPreviewQrCodeService) {
17+
this.$analyticsService.setShouldDispose(this.$options.justlaunch || !this.$options.watch);
18+
}
1619

1720
public async execute(): Promise<void> {
1821
this.$previewAppLogProvider.on(DEVICE_LOG_EVENT_NAME, (deviceId: string, message: string) => {

npm-shrinkwrap.json

+15-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)