mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
parent
4bfb4db5f1
commit
ec8b9b8ea8
@ -61,7 +61,7 @@ export class SyncScrollMapper {
|
||||
}
|
||||
// Since getBoundingClientRect() returns a relative position,
|
||||
// the offset of the origin is needed to get its aboslute position.
|
||||
const offset = doc.getElementById('rendered-md').getBoundingClientRect().top;
|
||||
const offset = doc.getElementById('rendered-md')?.getBoundingClientRect().top;
|
||||
if (!offset) return null;
|
||||
// Mapping information between editor's lines and viewer's elements is
|
||||
// embedded into elements by the renderer.
|
||||
|
Loading…
Reference in New Issue
Block a user