Skip to content

Commit

Permalink
fix: add condition to check type of property before parsing from json…
Browse files Browse the repository at this point in the history
… object

Signed-off-by: Muhammad Aaqil <[email protected]>
  • Loading branch information
aaqilniz committed Jun 25, 2024
1 parent 7a1083e commit 67084f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/generators/datasource/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ module.exports = class DataSourceGenerator extends ArtifactGenerator {
if (props[key] == null || props[key] === '') {
delete props[key];
} else {
props[key] = JSON.parse(props[key]);
if (typeof props[key] === 'string') {
props[key] = JSON.parse(props[key]);
}
}
break;
}
Expand Down

0 comments on commit 67084f6

Please sign in to comment.