Skip to content

Commit

Permalink
fix: prevent logging error if layout is done before it should
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed Aug 23, 2024
1 parent 9f0c4a7 commit ad82d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const createReader = (inputSettings: CreateReaderOptions) => {
const containerElement = elementSubject$.getValue()?.parentElement
const element = elementSubject$.getValue()

if (!element || !containerElement) throw new Error("Invalid element")
if (!element || !containerElement) return

const dimensions = {
width: containerElement?.offsetWidth,
Expand Down

0 comments on commit ad82d5e

Please sign in to comment.