mirror of
https://github.com/outline/outline.git
synced 2026-11-25 15:15:15 +03:00
flow: various flow fixes
This commit is contained in:
1 parent
4b540968dd
commit
4bdeb609e2
4 files changed
+8
-7
No files matched your search
@@ -93,8 +93,6 @@ class Layout extends React.Component<Props> {
|
||||
|
||||
@keydown("n")
|
||||
goToNewDocument() {
|
||||
if (this.props.ui.editMode) return;
|
||||
|
||||
const { activeCollectionId } = this.props.ui;
|
||||
if (!activeCollectionId) return;
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ type Props = {|
|
||||
canUpdate: boolean,
|
||||
activeDocument: ?Document,
|
||||
prefetchDocument: (id: string) => Promise<void>,
|
||||
belowCollection: Collection | undefined,
|
||||
belowCollection: Collection | void,
|
||||
isAnyCollectionDragging: boolean,
|
||||
setIsAnyCollectionDragging: () => void,
|
||||
setIsAnyCollectionDragging: (dragging: boolean) => void,
|
||||
|};
|
||||
|
||||
function CollectionLink({
|
||||
|
||||
@@ -19,8 +19,8 @@ export default class Collection extends BaseModel {
|
||||
sharing: boolean;
|
||||
index: string;
|
||||
documents: NavigationNode[];
|
||||
createdAt: ?string;
|
||||
updatedAt: ?string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: ?string;
|
||||
sort: { field: string, direction: "asc" | "desc" };
|
||||
url: string;
|
||||
|
||||
@@ -111,7 +111,10 @@ export default class CollectionsStore extends BaseStore<Collection> {
|
||||
});
|
||||
invariant(res && res.success, "Collection could not be moved");
|
||||
const collection = this.get(collectionId);
|
||||
collection.updateIndex(index);
|
||||
|
||||
if (collection) {
|
||||
collection.updateIndex(index);
|
||||
}
|
||||
};
|
||||
|
||||
async update(params: Object): Promise<Collection> {
|
||||
|
||||
Reference in new issue
Block a user