Skip to content

Commit 8bb97d3

Browse files
Merge pull request #966 from stephenplusplus/spp--datastore-docs-fix
datastore readme upsert fix
2 parents 90a0f09 + f451e28 commit 8bb97d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ dataset.save({
154154
data: blogPostData
155155
}, function(err) {
156156
// `blogPostKey` has been updated with an ID so you can do more operations
157-
// with it, such as an update:
157+
// with it, such as an update.
158+
blogPostData.isDraft = false;
159+
158160
dataset.save({
159161
key: blogPostKey,
160-
data: {
161-
isDraft: false
162-
}
162+
data: blogPostData
163163
}, function(err) {
164164
if (!err) {
165165
// The blog post is now published!

0 commit comments

Comments
 (0)