Skip to content

Commit

Permalink
making prettier happy
Browse files Browse the repository at this point in the history
Co-authored-by: Saikrishna321 <[email protected]>
  • Loading branch information
SrinivasanTarget and saikrishna321 committed Jan 6, 2025
1 parent f8d5a9c commit ce4433b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/common/renderer/actions/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ export function newSession(caps, attachSessId = null) {

// Get capabilities and interpolate environment variables
let desiredCapabilities = caps ? getCapsObject(caps) : {};

// Modify this section to handle W3C capabilities format
if (desiredCapabilities.alwaysMatch) {
desiredCapabilities.alwaysMatch = interpolateEnvironmentVariables(
desiredCapabilities.alwaysMatch,
environmentVariables
environmentVariables,
);
} else {
desiredCapabilities = interpolateEnvironmentVariables(
desiredCapabilities,
environmentVariables
environmentVariables,
);
}

Expand Down Expand Up @@ -1225,7 +1225,7 @@ export function setEnvironmentVariables(envVars) {

export function loadEnvironmentVariables() {
return async (dispatch) => {
const envVars = await getSetting(ENVIRONMENT_VARIABLES) || [];
const envVars = (await getSetting(ENVIRONMENT_VARIABLES)) || [];
dispatch({type: SET_ENVIRONMENT_VARIABLES, envVars});
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ const EnvironmentVariables = ({t, envVars, addVariable, deleteVariable}) => {
</Button>
</Space.Compact>
</div>
<Table columns={columns} dataSource={tableData} pagination={false} rowKey="key" size="small" />
<Table
columns={columns}
dataSource={tableData}
pagination={false}
rowKey="key"
size="small"
/>
</div>
</Card>
);
Expand Down
5 changes: 2 additions & 3 deletions app/common/renderer/reducers/Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ let nextState;

export default function inspector(state = INITIAL_STATE, action) {
switch (action.type) {

case SET_SOURCE_AND_SCREENSHOT:
return {
...state,
Expand Down Expand Up @@ -677,15 +676,15 @@ export default function inspector(state = INITIAL_STATE, action) {
...state,
environmentVariables: [
...(state.environmentVariables || []),
{key: action.key, value: action.value}
{key: action.key, value: action.value},
],
};

case DELETE_ENVIRONMENT_VARIABLE:
return {
...state,
environmentVariables: (state.environmentVariables || []).filter(
(envVar) => envVar.key !== action.key
(envVar) => envVar.key !== action.key,
),
};

Expand Down
2 changes: 1 addition & 1 deletion app/common/renderer/reducers/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
SWITCHED_TABS,
SET_ENVIRONMENT_VARIABLES,
ADD_ENVIRONMENT_VARIABLE,
DELETE_ENVIRONMENT_VARIABLE
DELETE_ENVIRONMENT_VARIABLE,
} from '../actions/Session';
import {SERVER_TYPES, SESSION_BUILDER_TABS} from '../constants/session-builder';

Expand Down

0 comments on commit ce4433b

Please sign in to comment.