fix(test): do not set ng.probe when ng is null or undefined

This commit is contained in:
Marc Laval 2015-09-09 15:21:02 +02:00
parent abc4ef31e2
commit df7f59b3a8
1 changed files with 3 additions and 0 deletions

View File

@ -342,5 +342,8 @@ export function setValueOnPath(global: any, path: string, value: any) {
obj = obj[name] = {}; obj = obj[name] = {};
} }
} }
if (obj === undefined || obj === null) {
obj = {};
}
obj[parts.shift()] = value; obj[parts.shift()] = value;
} }