From 08319fa02d9865d5a67d1ec16ee6836cd16f8633 Mon Sep 17 00:00:00 2001 From: Andrew Simachev Date: Tue, 29 Oct 2024 09:52:18 +0100 Subject: [PATCH] JS-5703: fix --- dist/extension/manifest.json | 2 +- extension/entry.tsx | 2 +- extension/popup/create.tsx | 10 +--------- src/ts/lib/util/data.ts | 24 ++++++++++++++++++++++++ 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/dist/extension/manifest.json b/dist/extension/manifest.json index d2b4478a06..65d4768c38 100644 --- a/dist/extension/manifest.json +++ b/dist/extension/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Anytype Web Clipper", "description": "Save web content to the Anytype — open, encrypted, and local-first application that connects everything as objects.", - "version": "0.0.6", + "version": "0.0.7", "icons": { "16": "img/icon16x16.png", "128": "img/icon128x128.png" diff --git a/extension/entry.tsx b/extension/entry.tsx index 9a3c0854b5..dabb2fed58 100644 --- a/extension/entry.tsx +++ b/extension/entry.tsx @@ -39,7 +39,7 @@ window.AnytypeGlobalConfig = { emojiUrl: J.Extension.clipper.emojiUrl, menuBorderTop: 16, menuBorderBottom: 16, - flagsMw: { request: false }, + flagsMw: { request: true }, }; let rootId = ''; diff --git a/extension/popup/create.tsx b/extension/popup/create.tsx index fcc67e1e64..42609ef0fa 100644 --- a/extension/popup/create.tsx +++ b/extension/popup/create.tsx @@ -169,7 +169,6 @@ const Create = observer(class Create extends React.Component it.isPersonal)?.id; - }; - if (spaceId) { - check = spaces.find(it => it.id == spaceId); - }; - - if (!spaceId || !check) { spaceId = spaces[0].id; }; @@ -362,6 +353,7 @@ const Create = observer(class Create extends React.Component $(element).removeClass('isFocused'), data: { canAdd: true, + canEdit: true, filter: '', value: this.details.tag, maxCount: relation.maxCount, diff --git a/src/ts/lib/util/data.ts b/src/ts/lib/util/data.ts index e789fe32c5..5e327679ce 100644 --- a/src/ts/lib/util/data.ts +++ b/src/ts/lib/util/data.ts @@ -872,11 +872,19 @@ class UtilData { if (!subId) { console.error('[U.Data].searchSubscribe: subId is empty'); + + if (callBack) { + callBack({}); + }; return; }; if (!spaceId) { console.error('[U.Data].searchSubscribe: spaceId is empty'); + + if (callBack) { + callBack({}); + }; return; }; @@ -910,16 +918,28 @@ class UtilData { if (!subId) { console.error('[U.Data].subscribeIds: subId is empty'); + + if (callBack) { + callBack({}); + }; return; }; if (!spaceId) { console.error('[U.Data].subscribeIds: spaceId is empty'); + + if (callBack) { + callBack({}); + }; return; }; if (!ids.length) { console.error('[U.Data].subscribeIds: ids list is empty'); + + if (callBack) { + callBack({}); + }; return; }; @@ -967,6 +987,10 @@ class UtilData { if (!spaceId) { console.error('[U.Data].search: spaceId is empty'); + + if (callBack) { + callBack({}); + }; return; };