Skip to content

Commit

Permalink
fix bug with optional value of remoteId
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Feb 11, 2024
1 parent 190a9a1 commit ad0b542
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
4 changes: 2 additions & 2 deletions src/annotations/annotation-save-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function createAnnotation({
? 'https://memex.social'
: 'http://staging.memex.social'

const link = baseUrl + '/a/' + shareData.remoteId
const link = baseUrl + '/a/' + shareData?.remoteId
navigator.clipboard.writeText(link)
} else if (shareOpts?.shouldShare) {
shareData = await contentSharingBG.shareAnnotation({
Expand All @@ -150,7 +150,7 @@ export async function createAnnotation({
privacyLevelOverride ?? shareOptsToPrivacyLvl(shareOpts),
})

if (shareData.remoteId != null) {
if (shareData?.remoteId != null) {
createAndCopyShareLink(
shareData.remoteId,
annotationUrl,
Expand Down

0 comments on commit ad0b542

Please sign in to comment.