Skip to content

Commit

Permalink
fix: fix notion auth problem
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondYuan committed Aug 11, 2022
1 parent 2554fad commit 00b1131
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web-clipper",
"version": "1.31.0",
"description": "Universal open source web clipper for Notion,OneNote,Joplin,Yuque,Bear,Github and more notes.",
"description": "Universal open source web clipper.",
"bin": {
"web-clipper": "bin/index.js"
},
Expand Down
5 changes: 2 additions & 3 deletions src/common/backend/services/notion/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default class NotionDocumentService implements DocumentService {
collection_id: string;
id: string;
type: string;
space_id: '268d56f2-ce25-4cbe-9ab6-ed7a280c89cb';
space_id: string;
properties: {
title: string[];
};
Expand Down Expand Up @@ -290,13 +290,12 @@ export default class NotionDocumentService implements DocumentService {
};
}
const collections = recentPages.recordMap.collection;
console.log(collections, value, collections[value.collection_id]);
if (
value.type === COLLECTION_VIEW_PAGE &&
!!value.collection_id &&
!!collections &&
!!collections[value.collection_id] &&
!!collections[value.collection_id].value &&
!!collections[value.collection_id].value &&
!!collections[value.collection_id].value.name
) {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/common/backend/services/notion/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface NotionUserContent {

export interface RecentPages {
recordMap: {
collection: {
collection?: {
[uuid: string]: {
role: string;
value: {
Expand Down

0 comments on commit 00b1131

Please sign in to comment.