Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit ee89f94

Browse files
committed
Simpler this.batch checks in live update.
After code review.
1 parent 7bd6704 commit ee89f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/usb-livesync-service-base.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class UsbLiveSyncServiceBase implements IUsbLiveSyncServiceBase {
190190
notInstalledAppOnDeviceAction: (_device: Mobile.IDevice) => IFuture<void>,
191191
beforeLiveSyncAction?: (_device1: Mobile.IDevice, _deviceAppData: Mobile.IDeviceAppData) => IFuture<void>,
192192
beforeBatchLiveSyncAction?: (_filePath: string) => IFuture<string>) : void {
193-
if (this.batch == null || !this.batch.syncPending) {
193+
if (!this.batch || !this.batch.syncPending) {
194194
this.batch = new SyncBatch(
195195
this.$logger, this.$dispatcher, (filesToSync) => {
196196
this.preparePlatformForSync(platform);
@@ -219,7 +219,7 @@ export class UsbLiveSyncServiceBase implements IUsbLiveSyncServiceBase {
219219
filePath: string,
220220
notRunningiOSSimulatorAction: () => IFuture<void>,
221221
iOSSimulatorRelativeToProjectBasePathAction:(projectFile: string) => string): void {
222-
if (this.batch == null || !this.batch.syncPending) {
222+
if (!this.batch || !this.batch.syncPending) {
223223
this.batch = new SyncBatch(
224224
this.$logger, this.$dispatcher, (filesToSync) => {
225225
this.$iOSEmulatorServices.syncFiles(appIdentifier, projectFilesPath, filesToSync, notRunningiOSSimulatorAction, iOSSimulatorRelativeToProjectBasePathAction);

0 commit comments

Comments
 (0)