Skip to content

Commit 04dc94c

Browse files
remove unwrap as not needed
1 parent 88f9c72 commit 04dc94c

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

plugins/Vercel/v1/dataStreams/scripts/deployments.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
// /v7/deployments returns { deployments: [...], pagination: {...} }.
22
// One row per deployment. Optional `project` objects-picker (stream ui name
33
// "project") arrives at context.config.project as an array (multi-select), each
4-
// rawId a single-element array. Empty/absent => account-wide, no filter.
54
const deployments = (data && data.deployments) || [];
65

7-
const unwrap = (v) => (Array.isArray(v) ? v[0] : v);
86
const selected = (context.config && context.config.project) || [];
9-
const projectIds = new Set(
10-
selected.map((o) => unwrap(o.rawId)).filter(Boolean),
11-
);
7+
const projectIds = new Set(selected.map((o) => o.rawId).filter(Boolean));
128

139
// Token paging walks `until` from pagination.next back to the `since` floor, so
1410
// the first page starts at "now". For a historical timeframe (e.g. lastMonth)

0 commit comments

Comments
 (0)