From de36359043c28750e958d985ca5c0c025c950068 Mon Sep 17 00:00:00 2001 From: Frank Lemanschik Date: Mon, 15 Oct 2018 13:25:16 +0100 Subject: [PATCH] Update prototype.update.md --- map/docs/prototype.update.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/map/docs/prototype.update.md b/map/docs/prototype.update.md index 9a9892c..494daeb 100644 --- a/map/docs/prototype.update.md +++ b/map/docs/prototype.update.md @@ -7,7 +7,6 @@ Assigns each value in `props` to a property on this map instance named after the corresponding key in `props`, effectively merging `props` into the Map. - Properties not in `props` will be set to `undefined`. ```js import {DefineMap, DefineList} from "can"; @@ -18,16 +17,16 @@ }); const obj = new MyMap({ - list: ["1", "2", "3"], - foo: "bar" + list: ["1", "2", "3"] }); obj.update({ - list: ["first"] + list: ["first"], + foo: "bar" }); - console.log( obj.serialize() ); //-> { list: ["first"] } - console.log( obj.foo ); //-> undefined + console.log( obj.serialize() ); //-> { list: ["first"], foo: 'bar' } + console.log( obj.foo ); //-> bar ``` @codepen