From bf0020cdecc5acb269946e018111e2382bd50bf4 Mon Sep 17 00:00:00 2001 From: Gabriel Birke Date: Fri, 23 Mar 2018 20:19:31 +0100 Subject: [PATCH] Fix example documentation Add callback to example call of `.save()` This will improve errors like the ones mentioned in https://github.com/saltfactory/front-matter-editor/issues/1 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c6948ec..7f84dcc 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,11 @@ editor.read(filePath) matter.data = data; }) .show() - .save(destPath, {postfix:'new'}); + .save(destPath, {postfix:'new'}, (err) => { + if (err) { + console.log('could not save', err); + } + }); ``` ## front-matter-editor methods