diff --git a/modules/angular2/src/core/facade/lang.ts b/modules/angular2/src/core/facade/lang.ts index f013f43bca..e38fd57158 100644 --- a/modules/angular2/src/core/facade/lang.ts +++ b/modules/angular2/src/core/facade/lang.ts @@ -342,5 +342,8 @@ export function setValueOnPath(global: any, path: string, value: any) { obj = obj[name] = {}; } } + if (obj === undefined || obj === null) { + obj = {}; + } obj[parts.shift()] = value; }