Fix SonarQube code smells:

1) String literals should not be duplicated.
2) Prefer using an optional chain expression instead, as it's more concise and easier to read.
3) Expected the Promise rejection reason to be an Error.
This commit is contained in:
Akshay Joshi
2024-06-10 18:04:32 +05:30
parent 2d2aa45ec5
commit 8857f0d179
57 changed files with 210 additions and 205 deletions

View File

@@ -111,7 +111,7 @@ function RightPanel({ schema, ...props }) {
try {
resolve(props.initValues);
} catch (error) {
reject(error);
reject(new Error(error));
}
});