File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -139,18 +139,21 @@ HTMLOptimizer.prototype._proceedLocales = function() {
139
139
if ( ! this . webapp . asts [ lang ] ) {
140
140
this . webapp . asts [ lang ] = [ ] ;
141
141
}
142
- for ( let i = 0 ; i < this . asts [ lang ] . length ; i ++ ) {
142
+ let asts = this . asts [ lang ] ;
143
+ let webappAsts = this . webapp . asts [ lang ] ;
144
+ for ( let i = 0 ; i < asts . length ; i ++ ) {
143
145
let index = - 1 ;
144
- for ( let j = 0 ; j < this . webapp . asts [ lang ] . length ; j ++ ) {
145
- if ( this . webapp . asts [ lang ] [ j ] . $i === this . asts [ lang ] [ i ] . $i ) {
146
+ let identifierToFind = asts [ i ] . $i ;
147
+ for ( let j = 0 ; j < webappAsts . length ; j ++ ) {
148
+ if ( webappAsts [ j ] . $i === identifierToFind ) {
146
149
index = j ;
147
150
break ;
148
151
}
149
152
}
150
153
if ( index !== - 1 ) {
151
- this . webapp . asts [ lang ] [ index ] = this . asts [ lang ] [ i ] ;
154
+ webappAsts [ index ] = asts [ i ] ;
152
155
} else {
153
- this . webapp . asts [ lang ] . push ( this . asts [ lang ] [ i ] ) ;
156
+ webappAsts . push ( asts [ i ] ) ;
154
157
}
155
158
}
156
159
}
You can’t perform that action at this time.
0 commit comments