Skip to content

Commit 8309939

Browse files
FatmeFatme
authored andcommitted
Merge pull request #497 from NativeScript/fatme/fix-options-validation
Cast cached device option to boolean before use it
2 parents f1d4ff6 + b08429f commit 8309939

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/services/android-debug-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class AndroidDebugService implements IDebugService {
3737
var cachedDeviceOption = this.$options.forDevice;
3838
this.$options.forDevice = true;
3939
this.$platformService.buildPlatform(this.platform).wait();
40-
this.$options.forDevice = cachedDeviceOption;
40+
this.$options.forDevice = !!cachedDeviceOption;
4141

4242
packageFile = this.$platformService.getLatestApplicationPackageForDevice(platformData).wait().packageName;
4343
this.$logger.out("Using ", packageFile);

lib/services/platform-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class PlatformService implements IPlatformService {
233233
var cachedDeviceOption = this.$options.forDevice;
234234
this.$options.forDevice = true;
235235
this.buildPlatform(platform).wait();
236-
this.$options.forDevice = cachedDeviceOption;
236+
this.$options.forDevice = !!cachedDeviceOption;
237237

238238
// Get latest package that is produced from build
239239
var packageFile = this.getLatestApplicationPackageForDevice(platformData).wait().packageName;

0 commit comments

Comments
 (0)