Update Editor.jsx

Small fix to add created or modified to the body correctly.
Below was my original fix but didn't want to change file flow

```js
meta[body.created ? 'modified' : 'created'] = props.env.getCurrentTimeAdjusted()
```

Great job with the all the Annotation packages, thank you.
This commit is contained in:
Adnan M.Sagar, PhD 2021-01-04 17:22:25 +02:00 committed by GitHub
parent edd16e48f2
commit 52a3ffb55f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -65,9 +65,9 @@ const Editor = props => {
if (user.displayName) meta.creator.name = user.displayName;
if (body.created)
body.modified = props.env.getCurrentTimeAdjusted();
meta.modified = props.env.getCurrentTimeAdjusted();
else
body.created = props.env.getCurrentTimeAdjusted();
meta.created = props.env.getCurrentTimeAdjusted();
}
return meta;
@ -160,4 +160,4 @@ const Editor = props => {
}
export default Editor;
export default Editor;