Issue-25 Added escapedPath to changePathVisibility to handle carriage return (\r) and other invalid querySelector paths characters.
This commit is contained in:
parent
b9b3e89660
commit
5535e07bb8
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
export function changePathVisibility(path: string, hide: boolean) {
|
||||
let n = document.querySelector(`[data-path="${path}"]`);
|
||||
let escapedPath = CSS.escape(path);
|
||||
let n = document.querySelector(`[data-path="${escapedPath}"]`);
|
||||
if (!n) {
|
||||
return;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue