From dc3d5f84941d105fc19b17cbea090f8c0c79ad1a Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 14 Feb 2017 08:15:38 -0500 Subject: [PATCH] fix migration example --- README.md | 2 +- docs/change-log.md | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9efe8bef..2fa81767 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Let's wrap our text in an `

` tag. m.render(root, m("h1", "My first app")) ``` -The `m()` function can be used to describe any HTML structure you want. So if you to add a class to the `

`: +The `m()` function can be used to describe any HTML structure you want. So if you need to add a class to the `

`: ```javascript m("h1", {class: "title"}, "My first app") diff --git a/docs/change-log.md b/docs/change-log.md index 8ff0d175..014f6c23 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -635,11 +635,13 @@ greetAsync() ### `v1.x` ```javascript -var greetAsync = new Promise(function(resolve){ - setTimeout(function() { - resolve("hello") - }, 1000) -}) +var greetAsync = function() { + return new Promise(function(resolve){ + setTimeout(function() { + resolve("hello") + }, 1000) + }) +} greetAsync() .then(function(value) {return value + " world"})