Merge pull request #2629 from ecency/nt/drafts-fix

avoid local draft load if draft body is empty
This commit is contained in:
Feruz M 2023-03-05 07:58:01 +02:00 committed by GitHub
commit 139444420d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,7 +234,7 @@ class EditorContainer extends Component<EditorContainerProps, any> {
// if no draft, use result anayways
const _remoteDraftModifiedAt = paramDraft ? new Date(paramDraft.modified).getTime() : 0;
const _useLocalDraft = _remoteDraftModifiedAt < (_localDraft?.updated || 0);
const _useLocalDraft = _remoteDraftModifiedAt < (_localDraft?.updated || 0) && !!_localDraft.body
if (_useLocalDraft) {
this.setState({
draftPost: {