Skip to content

Commit

Permalink
(#547) Addressed some sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed Dec 14, 2023
1 parent 1538576 commit 264d827
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/generate-output-path.function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export const generateOutputPath = (
path?: string;
prefix?: string;
postfix?: string;
}
},
) => {
const name = parse(filename).name;
const imageType = params && params.type ? params.type : FileType.PNG;
const path = params && params.path ? params.path : cwd();
const prefix = params && params.prefix ? params.prefix : "";
const postfix = params && params.postfix ? params.postfix : "";
const imageType = params?.type ? params.type : FileType.PNG;
const path = params?.path ? params.path : cwd();
const prefix = params?.prefix ? params.prefix : "";
const postfix = params?.postfix ? params.postfix : "";
return join(path, `${prefix}${name}${postfix}${imageType}`);
};
2 changes: 1 addition & 1 deletion lib/screen.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ export class ScreenClass {
public on(searchInput: FindInput, callback: FindHookCallback): void {
this.validateSearchInput("on", searchInput);

const existingHooks = this.findHooks.get(searchInput) || [];
const existingHooks = this.findHooks.get(searchInput) ?? [];
this.findHooks.set(searchInput, [...existingHooks, callback]);
this.providerRegistry
.getLogProvider()
Expand Down

0 comments on commit 264d827

Please sign in to comment.