Skip to content

Commit

Permalink
fix: exception thrown when clicking left from a selection
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed May 13, 2022
1 parent 5e200bf commit e7e8094
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/logic/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,15 @@ export function createSelection(json, state, selectionSchema) {
anchorPath: path,
focusPath: path
}
} else if (type === SELECTION_TYPE.MULTI && path) {
const paths = [path]
return {
type: SELECTION_TYPE.MULTI,
anchorPath: path,
focusPath: path,
paths: paths,
pathsMap: createPathsMap(paths)
}
} else if (anchorPath && focusPath) {
const paths = expandSelection(json, state, anchorPath, focusPath)

Expand Down

0 comments on commit e7e8094

Please sign in to comment.