Skip to content

Commit 3af19ab

Browse files
committed
update placement tag helper to prevent unsupported tags
1 parent d5a1467 commit 3af19ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/v3/schemas/runEngine.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ export const PlacementTag = z.object({
230230
});
231231
export type PlacementTag = z.infer<typeof PlacementTag>;
232232

233-
/** Helper functions for placement tags. Accepts a single value or an array of values. */
234-
export function placementTag(key: string, valueOrValues: string | string[]): PlacementTag {
235-
return { key, values: Array.isArray(valueOrValues) ? valueOrValues : [valueOrValues] };
233+
/** Helper functions for placement tags. In the future this will be able to support multiple values and operators. For now it's just a single value. */
234+
export function placementTag(key: string, value: string): PlacementTag {
235+
return { key, values: [value] };
236236
}
237237

238238
/** This is sent to a Worker when a run is dequeued (a new run or continuing run) */

0 commit comments

Comments
 (0)