Skip to content

Commit

Permalink
refactor(bridge-ui-v2): remove redundant conditions (#15098)
Browse files Browse the repository at this point in the history
  • Loading branch information
NguyenTuanCanh authored Nov 2, 2023
1 parent d574028 commit a6354e5
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,8 @@ enum LayerType {
const _formatObjectToTsLiteral = (obj: ChainConfigMap): string => {
const formatValue = (value: ChainConfig): string => {
if (typeof value === 'string') {
if (typeof value === 'string') {
if (Object.values(LayerType).includes(value as LayerType)) {
return `LayerType.${value}`; // This line is using LayerType as an enum, but it is now a type
}
return `"${value}"`;
if (Object.values(LayerType).includes(value as LayerType)) {
return `LayerType.${value}`; // This line is using LayerType as an enum, but it is now a type
}
return `"${value}"`;
}
Expand Down

0 comments on commit a6354e5

Please sign in to comment.