get method on Observable created with fromObject wan’t returning the value that was put from set if that property was not specified in the object passed to fromObject. (#4213)

get method on Observable created with fromObject wasn’t returning the …
This commit is contained in:
Hristo Hristov
2017-05-17 13:30:46 +03:00
committed by GitHub
parent 585e74e752
commit cbbee3bbe7
2 changed files with 24 additions and 0 deletions

View File

@@ -185,6 +185,10 @@ export class Observable implements ObservableDefinition {
class ObservableFromObject extends Observable {
public _map = {};
public get(name: string): any {
return this._map[name];
}
public set(name: string, value: any) {
const currentValue = this._map[name];
if (currentValue === value) {