@plait/core 0.15.1 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -344,6 +344,9 @@ const Path = {
344
344
  const last = path[path.length - 1];
345
345
  return path.slice(0, -1).concat(last + 1);
346
346
  },
347
+ hasPrevious(path) {
348
+ return path[path.length - 1] > 0;
349
+ },
347
350
  previous(path) {
348
351
  if (path.length === 0) {
349
352
  throw new Error(`Cannot get the next path of a root path [${path}], because it has no previous index.`);
@@ -2637,6 +2640,9 @@ const withHotkey = (board) => {
2637
2640
  event.preventDefault();
2638
2641
  let elements = [];
2639
2642
  depthFirstRecursion(board, node => {
2643
+ if (PlaitBoard.isBoard(node)) {
2644
+ return;
2645
+ }
2640
2646
  elements.push(node);
2641
2647
  }, node => {
2642
2648
  if (PlaitBoard.isBoard(node) || board.isRecursion(node)) {