chore: Auto reload frontend of client is out of date (#1270)
* Move editor version to header Add editor version check for API endpoints * fix: Editor update auto-reload Bump RME * fix: Only redirect if editor header exists * lint
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
import { action, set, observable, computed } from 'mobx';
|
||||
import pkg from 'rich-markdown-editor/package.json';
|
||||
import addDays from 'date-fns/add_days';
|
||||
import invariant from 'invariant';
|
||||
import { client } from 'utils/ApiClient';
|
||||
@@ -180,7 +179,6 @@ export default class Document extends BaseModel {
|
||||
try {
|
||||
if (isCreating) {
|
||||
return await this.store.create({
|
||||
editorVersion: pkg.version,
|
||||
parentDocumentId: this.parentDocumentId,
|
||||
collectionId: this.collectionId,
|
||||
title: this.title,
|
||||
@@ -194,7 +192,6 @@ export default class Document extends BaseModel {
|
||||
title: this.title,
|
||||
text: this.text,
|
||||
lastRevision: this.revision,
|
||||
editorVersion: pkg.version,
|
||||
...options,
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user