mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix: add prefer-dom-node-dataset rule (#5107)
This commit is contained in:
@@ -9,7 +9,7 @@ previewBlockIdAtom.onMount = set => {
|
||||
if (target?.tagName === 'IMG') {
|
||||
const imageBlock = target.closest('affine-image');
|
||||
if (imageBlock) {
|
||||
const blockId = imageBlock.getAttribute('data-block-id');
|
||||
const blockId = imageBlock.dataset.blockId;
|
||||
if (!blockId) return;
|
||||
set(blockId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user