MCPcopy Index your code
hub / github.com/buildbot/buildbot / initial

Method initial

www/data-module/src/data/DataCollection.ts:138–151  ·  view source on GitHub ↗
(data: any[])

Source from the content-addressed store, hash-verified

136 }
137
138 @action initial(data: any[]) {
139 // put items one by one if not already in the array if they are that means they come from an
140 // update event the event is always considered the latest data so we don't overwrite it
141 // with REST data
142 for (const element of data) {
143 const id = element[this.descriptor.fieldId];
144 if (!this.idsBeforeResolve.has(String(id))) {
145 this.put(element);
146 }
147 }
148 this.resolved = true;
149 this.idsBeforeResolve.clear();
150 this.recomputeQuery();
151 }
152
153 @action put(element: any) {
154 const id = element[this.descriptor.fieldId];

Callers 1

createCollectionMethod · 0.95

Calls 5

putMethod · 0.95
recomputeQueryMethod · 0.95
hasMethod · 0.80
StringClass · 0.50
clearMethod · 0.45

Tested by

no test coverage detected