Skip to content

Commit 6dc3de3

Browse files
committed
fix: prevent . in ID from causing errors
1 parent 4497ca8 commit 6dc3de3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { layoutChildren } from './layout'
88
const $d = document
99
export const findEle = function (this: MindElixirInstance, id: string, el?: HTMLElement) {
1010
const scope = this?.el ? this.el : el ? el : document
11-
const ele = scope.querySelector<Topic>(`[data-nodeid=me${id}]`)
11+
const ele = scope.querySelector<Topic>(`[data-nodeid="me${id}"]`)
1212
if (!ele) throw new Error(`FindEle: Node ${id} not found, maybe it's collapsed.`)
1313
return ele
1414
}

0 commit comments

Comments
 (0)