Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
fix: fetch embeds correctly (no version)
Browse files Browse the repository at this point in the history
  • Loading branch information
horacioh committed Apr 8, 2024
1 parent ca3368a commit e4bb5f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 2 additions & 8 deletions frontend/packages/app/components/app-embeds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,8 @@ export function EmbedPublicationContent(props: EntityComponentProps) {
}

export function EmbedPublicationCard(props: EntityComponentProps) {
const docId =
props.type == 'd'
? createHmId('d', props.eid, {
blockRange: props.blockRange,
blockRef: props.blockRef,
version: props.version,
})
: undefined
// we can't pass anything else to `createHmId` because this is creating the string we need to pass to getPublication
const docId = props.type == 'd' ? createHmId('d', props.eid) : undefined
const pub = usePublicationVariant({
documentId: docId,
versionId: props.latest ? undefined : props.version || undefined,
Expand Down
2 changes: 0 additions & 2 deletions frontend/packages/shared/src/range-selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ const machine = setup({
// @ts-expect-error
setRange: assign(() => {
let sel = window.getSelection()

console.log(`== ~ setRange:assign ~ sel:`, sel)
if (sel && sel.rangeCount > 0) {
const {anchorNode, anchorOffset, focusNode, focusOffset} = sel
const anchorBlockId = getParentElId(anchorNode)
Expand Down

0 comments on commit e4bb5f5

Please sign in to comment.