Skip to content

Commit 5f0a0fd

Browse files
committed
fix(wtf): fix NgZone.run instrumentation
Closes angular#3788
1 parent a205807 commit 5f0a0fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/angular2/src/core/zone/ng_zone.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ export class NgZone {
139139
*/
140140
run(fn: () => any): any {
141141
if (this._disabled) {
142+
return fn();
143+
} else {
142144
var s = this._zone_run_scope();
143145
try {
144-
return fn();
146+
return this._innerZone.run(fn);
145147
} finally {
146148
wtfLeave(s);
147149
}
148-
} else {
149-
return this._innerZone.run(fn);
150150
}
151151
}
152152

0 commit comments

Comments
 (0)