X Tutup
Skip to content

Commit 762a94f

Browse files
committed
fix(transformers): fix sort order for reflective imports
Fix sort order for reflective imports in reflection_remover/rewriter.dart. Currently there is only one import so the sort order happens to be correct, but if another one is added the rewrite code will break.
1 parent 5b597de commit 762a94f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/angular2/src/transform/reflection_remover/rewriter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Rewriter {
4444
return _code;
4545
}
4646

47-
var compare = (AstNode a, AstNode b) => b.offset - a.offset;
47+
var compare = (AstNode a, AstNode b) => a.offset - b.offset;
4848
visitor.reflectionCapabilityImports.sort(compare);
4949
visitor.reflectionCapabilityAssignments.sort(compare);
5050

0 commit comments

Comments
 (0)
X Tutup