Skip to content

Commit 52ec166

Browse files
fix: undifined token
1 parent dccb7ce commit 52ec166

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/device-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class DeviceManager implements IDeviceManager {
3333
args.appiumCaps.platformName = args.appiumCaps.platformName.toLowerCase();
3434
let device: IDevice = DeviceManager.getDefaultDevice(args);
3535
const token = process.env["DEVICE_TOKEN"] || process.env.npm_config_deviceToken;
36-
device.token = device.token.replace("emulator-", "");
36+
device.token = token && token.replace("emulator-", "");
3737
device.name = process.env["DEVICE_NAME"] || device.name;
3838
console.log("Default device: ", device);
3939
DeviceManager.cleanUnsetProp(device);

0 commit comments

Comments
 (0)