diff --git a/editor/src/core/shared/math-utils.ts b/editor/src/core/shared/math-utils.ts index 37d54197e16e..4978b144f4bf 100644 --- a/editor/src/core/shared/math-utils.ts +++ b/editor/src/core/shared/math-utils.ts @@ -1,4 +1,3 @@ -import { stripNulls } from './array-utils' import type { Either } from './either' import { left, right, mapEither } from './either' @@ -639,6 +638,17 @@ export function combineRectangles( } as Rectangle } +// Copied from array-utils.ts to prevent a cyclic dependency +function stripNulls(array: Array): Array { + var workingArray: Array = [] + for (const value of array) { + if (value !== null && value !== undefined) { + workingArray.push(value) + } + } + return workingArray +} + export function boundingRectangleArray( rectangles: Array | null>, ): Rectangle | null {