fix(editor): Properly handle mapping of dragged expression if it contains hyphen (#5703)

This commit is contained in:
OlegIvaniv
2023-03-16 14:10:30 +01:00
committed by GitHub
parent 02e35819ab
commit 7025efe865
2 changed files with 57 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ export function generatePath(root: string, path: Array<string | number>): string
return `${accu}[${part}]`;
}
if (part.includes(' ') || part.includes('.')) {
if (part.includes('-') || part.includes(' ') || part.includes('.')) {
return `${accu}["${part}"]`;
}