Skip to content

Commit

Permalink
fix(options): 🚸 don't clear databaseId on authorisation
Browse files Browse the repository at this point in the history
an invalid databaseId is unable to be used in the popup anyway (shows 'Configure Database') button, so clearing it just results in confusing behaviour upon Restore Defaults/Restore Saved

ie if Restore Defaults -> Reauthorise -> databaseId cleared -> same database is repopulated into the select, but has been cleared from storage, so the extension thinks that it has been modified, whilst the user would think that it is the same configuration
  • Loading branch information
JamesNZL committed Jul 17, 2022
1 parent 59f4265 commit 060dbe0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/options/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,6 @@ buttons.oauth.addEventListener('click', async () => {

if (!success) return buttons.oauth.resetHTML();

// TODO: remove this
Storage.clearDatabaseId();

const { accessToken } = await Storage.getNotionAuthorisation();
CONFIGURATION.FIELDS['notion.accessToken'].input.setValue(accessToken ?? null);
});
Expand Down

0 comments on commit 060dbe0

Please sign in to comment.