Skip to content

Commit b3f8bef

Browse files
Update recipes/crypto-create-credentials/src/workflow.ts
Co-authored-by: Jacob Smith <[email protected]>
1 parent dfeb476 commit b3f8bef

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

recipes/crypto-create-credentials/src/workflow.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,9 @@ export default function transform(root: SgRoot): string | null {
335335
let importType: ImportType | undefined;
336336

337337
if (importMatch.kind() === 'import_statement') {
338-
if (importMatch.find({ rule: { kind: 'namespace_import' } })) {
339-
importType = 'NAMESPACE_IMPORT';
340-
} else {
341-
importType = 'DESTRUCTURED_IMPORT';
342-
}
338+
importType = importMatch.find({ rule: { kind: 'namespace_import' } })
339+
? 'NAMESPACE_IMPORT'
340+
: 'DESTRUCTURED_IMPORT';
343341
} else {
344342
if (nameNode?.is('object_pattern')) {
345343
importType = 'DESTRUCTURED_REQUIRE';

0 commit comments

Comments
 (0)