Skip to content

Commit 21ce469

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

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,11 @@ function handleDestructuredImport(
181181
localEdits.push(statement.replace(newImportStatement));
182182
finalState = { ...currentState, added: true };
183183
} else {
184-
const otherProps = destructuredProps
185-
.filter((id) => id.text() !== 'createCredentials')
186-
.map((id) => id.text());
184+
const otherProps = [];
185+
for (const d of destructuredProps) {
186+
const text = d.text();
187+
if (text !== 'createCredentials') otherProps.push(text);
188+
}
187189

188190
const newDestructuredString = `{ ${otherProps.join(', ')} }`;
189191
localEdits.push(specifiersNode.replace(newDestructuredString));

0 commit comments

Comments
 (0)