X Tutup
Skip to content

Commit fb16c39

Browse files
marclavaljelbourn
authored andcommitted
chore(build): fix flakiness of the element probe global test
1 parent 62c2ed7 commit fb16c39

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

modules/angular2/src/facade/lang.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export function setValueOnPath(global: any, path: string, value: any) {
354354
var obj: any = global;
355355
while (parts.length > 1) {
356356
var name = parts.shift();
357-
if (obj.hasOwnProperty(name)) {
357+
if (obj.hasOwnProperty(name) && isPresent(obj[name])) {
358358
obj = obj[name];
359359
} else {
360360
obj = obj[name] = {};

modules/angular2/src/platform/browser/tools/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ export function enableDebugTools(ref: ComponentRef): void {
2323
* Disables Angular 2 tools.
2424
*/
2525
export function disableDebugTools(): void {
26-
context.ng = undefined;
26+
delete context.ng;
2727
}

modules/angular2/src/platform/dom/debug/debug_element_view_listener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ export const ELEMENT_PROBE_PROVIDERS: any[] = CONST_EXPR([
7272
CONST_EXPR(new Provider(AppViewListener, {useExisting: DebugElementViewListener})),
7373
]);
7474

75-
export const ELEMENT_PROBE_BINDINGS = ELEMENT_PROBE_PROVIDERS;
75+
export const ELEMENT_PROBE_BINDINGS = ELEMENT_PROBE_PROVIDERS;

modules/angular2/test/platform/browser/debug/debug_element_view_listener_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function main() {
6868

6969
async.done();
7070
});
71-
}), 10000);
71+
}), 1000);
7272
}
7373
});
7474
}

0 commit comments

Comments
 (0)
X Tutup