@@ -189,31 +189,31 @@ class Chunk {
189189 }
190190 }
191191
192- integrate ( other , reason ) {
193- if ( ! this . canBeIntegrated ( other ) ) {
192+ integrate ( otherChunk , reason ) {
193+ if ( ! this . canBeIntegrated ( otherChunk ) ) {
194194 return false ;
195195 }
196196
197- const otherModules = other . modules . slice ( ) ;
198- otherModules . forEach ( m => other . moveModule ( m , this ) ) ;
199- other . modules . length = 0 ;
197+ const otherChunkModules = otherChunk . modules . slice ( ) ;
198+ otherChunkModules . forEach ( module => otherChunk . moveModule ( module , this ) ) ;
199+ otherChunk . modules . length = 0 ;
200200
201- other . parents . forEach ( parent => parent . replaceChunk ( other , this ) ) ;
202- other . parents . length = 0 ;
201+ otherChunk . parents . forEach ( parent => parent . replaceChunk ( otherChunk , this ) ) ;
202+ otherChunk . parents . length = 0 ;
203203
204- other . chunks . forEach ( chunk => chunk . replaceParent ( other , this ) ) ;
205- other . chunks . length = 0 ;
204+ otherChunk . chunks . forEach ( chunk => chunk . replaceParent ( otherChunk , this ) ) ;
205+ otherChunk . chunks . length = 0 ;
206206
207- other . blocks . forEach ( b => {
207+ otherChunk . blocks . forEach ( b => {
208208 b . chunks = b . chunks ? b . chunks . map ( c => {
209- return c === other ? this : c ;
209+ return c === otherChunk ? this : c ;
210210 } ) : [ this ] ;
211211 b . chunkReason = reason ;
212212 this . addBlock ( b ) ;
213213 } ) ;
214- other . blocks . length = 0 ;
214+ otherChunk . blocks . length = 0 ;
215215
216- other . origins . forEach ( origin => {
216+ otherChunk . origins . forEach ( origin => {
217217 this . origins . push ( origin ) ;
218218 } ) ;
219219 this . origins . forEach ( origin => {
@@ -223,30 +223,30 @@ class Chunk {
223223 origin . reasons . unshift ( reason ) ;
224224 }
225225 } ) ;
226- this . chunks = this . chunks . filter ( c => {
227- return c !== other && c !== this ;
226+ this . chunks = this . chunks . filter ( chunk => {
227+ return chunk !== otherChunk && chunk !== this ;
228228 } ) ;
229- this . parents = this . parents . filter ( c => {
230- return c !== other && c !== this ;
229+ this . parents = this . parents . filter ( parent => {
230+ return parent !== otherChunk && parent !== this ;
231231 } ) ;
232232 return true ;
233233 }
234234
235235 split ( newChunk ) {
236- this . blocks . forEach ( b => {
237- newChunk . blocks . push ( b ) ;
238- b . chunks . push ( newChunk ) ;
236+ this . blocks . forEach ( block => {
237+ newChunk . blocks . push ( block ) ;
238+ block . chunks . push ( newChunk ) ;
239239 } ) ;
240- this . chunks . forEach ( c => {
241- newChunk . chunks . push ( c ) ;
242- c . parents . push ( newChunk ) ;
240+ this . chunks . forEach ( chunk => {
241+ newChunk . chunks . push ( chunk ) ;
242+ chunk . parents . push ( newChunk ) ;
243243 } ) ;
244- this . parents . forEach ( p => {
245- p . chunks . push ( newChunk ) ;
246- newChunk . parents . push ( p ) ;
244+ this . parents . forEach ( parent => {
245+ parent . chunks . push ( newChunk ) ;
246+ newChunk . parents . push ( parent ) ;
247247 } ) ;
248- this . entrypoints . forEach ( e => {
249- e . insertChunk ( newChunk , this ) ;
248+ this . entrypoints . forEach ( entrypoint => {
249+ entrypoint . insertChunk ( newChunk , this ) ;
250250 } ) ;
251251 }
252252
0 commit comments