feat: Show drafts in sidebar when viewing (#2820)
This commit is contained in:
@@ -15,7 +15,7 @@ import withStores from "~/components/withStores";
|
||||
import { NavigationNode } from "~/types";
|
||||
import { NotFoundError, OfflineError } from "~/utils/errors";
|
||||
import history from "~/utils/history";
|
||||
import { matchDocumentEdit, updateDocumentUrl } from "~/utils/routeHelpers";
|
||||
import { matchDocumentEdit } from "~/utils/routeHelpers";
|
||||
import { isInternalUrl } from "~/utils/urls";
|
||||
import HideSidebar from "./HideSidebar";
|
||||
import Loading from "./Loading";
|
||||
@@ -228,17 +228,6 @@ class DataLoader extends React.Component<Props> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const isMove = this.props.location.pathname.match(/move$/);
|
||||
const canRedirect = !revisionId && !isMove && !shareId;
|
||||
|
||||
if (canRedirect) {
|
||||
const canonicalUrl = updateDocumentUrl(this.props.match.url, document);
|
||||
|
||||
if (this.props.location.pathname !== canonicalUrl) {
|
||||
history.replace(canonicalUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user