diff --git a/src/modules/sync/sync/assetFolders.ts b/src/modules/sync/sync/assetFolders.ts index 19bbb43e..a9cc05c1 100644 --- a/src/modules/sync/sync/assetFolders.ts +++ b/src/modules/sync/sync/assetFolders.ts @@ -45,8 +45,9 @@ const convertOperation = (operation: PatchOperation): AssetFolderModels.IModifyA reference: targetCodename ?? throwError(`Missing target codename in ${JSON.stringify(operation)}`), value: typeof op.value === "string" ? op.value : throwError("Invalid value type"), })) - .otherwise(op => ({ + .with({ op: "remove" }, op => ({ ...omit(op, ["oldValue"]), reference: targetCodename ?? throwError(`Missing target codename in ${JSON.stringify(operation)}`), - })); + })) + .exhaustive(); };