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:
parent
edd16e48f2
commit
52a3ffb55f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue