chore(build): fix flakiness of the element probe global test

This commit is contained in:
mlaval
2015-11-26 19:38:14 +01:00
committed by Jeremy Elbourn
parent 62c2ed7c43
commit fb16c39496
4 changed files with 4 additions and 4 deletions

View File

@ -354,7 +354,7 @@ export function setValueOnPath(global: any, path: string, value: any) {
var obj: any = global;
while (parts.length > 1) {
var name = parts.shift();
if (obj.hasOwnProperty(name)) {
if (obj.hasOwnProperty(name) && isPresent(obj[name])) {
obj = obj[name];
} else {
obj = obj[name] = {};