Skip to content

Commit

Permalink
Remove all instances of structureClone
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Nov 19, 2024
1 parent b92ec08 commit 033fcd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/apollo-cli/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function getAssembly(
const assemblies = (await res.json()) as ApolloAssemblySnapshot[]
for (const x of assemblies) {
if (x._id === assemblyId[0]) {
return structuredClone(x)
return JSON.parse(JSON.stringify(x)) as ApolloAssemblySnapshot
}
}
throw new Error(`Assembly "${assemblyNameOrId}" not found`)
Expand Down
4 changes: 2 additions & 2 deletions packages/apollo-shared/src/Changes/AddFeatureChange.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */

/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/require-await */
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
import {
Expand Down Expand Up @@ -143,7 +143,7 @@ export class AddFeatureChange extends FeatureChange {
}
attributes = {
_id: [parentFeature._id.toString()],
...structuredClone(attributes),
...JSON.parse(JSON.stringify(attributes)),
}
parentFeature.attributes = attributes
}
Expand Down

0 comments on commit 033fcd0

Please sign in to comment.