refactor: Use || instead of ??

This commit is contained in:
Sidharth Vinod
2023-09-06 23:21:51 +05:30
parent 8662b33de9
commit 7d2b39f69f

View File

@@ -54,13 +54,13 @@ export const imgSnapshotTest = (
): void => { ): void => {
const options: CypressMermaidConfig = { const options: CypressMermaidConfig = {
..._options, ..._options,
fontFamily: _options.fontFamily ?? 'courier', fontFamily: _options.fontFamily || 'courier',
// @ts-ignore TODO: Fix type of fontSize // @ts-ignore TODO: Fix type of fontSize
fontSize: _options.fontSize ?? '16px', fontSize: _options.fontSize || '16px',
sequence: { sequence: {
...(_options.sequence ?? {}), ...(_options.sequence || {}),
actorFontFamily: 'courier', actorFontFamily: 'courier',
noteFontFamily: _options.sequence?.noteFontFamily ?? 'courier', noteFontFamily: _options.sequence?.noteFontFamily || 'courier',
messageFontFamily: 'courier', messageFontFamily: 'courier',
}, },
}; };