Skip to content

Commit

Permalink
fix(base-driver): Make sure we never mutate incoming args (#16670)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Mar 28, 2022
1 parent 25fab42 commit c63e9bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/base-driver/lib/basedriver/core.js
Expand Up @@ -155,7 +155,7 @@ class DriverCore {
if (!this._log) {
const instanceName = `${this.constructor.name}@${node
.getObjectId(this)
.substring(0, 8)}`;
.substring(0, 4)}`;
this._log = logger.getLogger(() =>
this.sessionId
? `${instanceName} (${this.sessionId.substring(0, 8)})`
Expand Down
4 changes: 2 additions & 2 deletions packages/base-driver/lib/basedriver/driver.js
Expand Up @@ -233,11 +233,11 @@ export class BaseDriverCore extends DriverCore {

this.log.debug();

const originalCaps = [
const originalCaps = _.cloneDeep([
w3cCapabilities,
w3cCapabilities1,
w3cCapabilities2,
].find(isW3cCaps);
].find(isW3cCaps));
if (!originalCaps) {
throw new errors.SessionNotCreatedError(
'Appium only supports W3C-style capability objects. ' +
Expand Down

0 comments on commit c63e9bf

Please sign in to comment.